Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Time zone displacement out of range" for heroku db:push, unable to solve using ruby 1.9.2

Tags:

heroku

taps

This question has been asked elsewhere, but it seems like the problem is back and the previous solutions don't work anymore.

Exception output is similar to:

Saving session to push_201205201307.dat..
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: PGError: ERROR:  time zone displacement out of range: "2012-05-09 12:00:00.000000+5894536800"

I'm running postgresql 9.1 on ubuntu 12.04, and using heroku cedar.

Other questions such as Error when pushing data to Heroku: time zone displacement out of range suggest that using rvm to switch to 1.9.2-p290 will match the version running on heroku and avoid the issue doesn't work for me.

Nulling out the values in the tables allows me to push the data, but I'm looking for more than a one-time workaround.

pgbackups seems like it would work, but I'd rather not set up another whole process to workaround using db:push.

Any suggestions? Is this actually a taps issue? People here seem to have mixed results: https://github.com/ricardochimal/taps/issues/92

like image 786
paulb Avatar asked Feb 01 '26 06:02

paulb


1 Answers

Just got it working after hours of frustration. I'm disappointed jfeust didn't give the tag of the gem that worked for him.

I have a pg database so:

$rvm requirements

(install the dependencies and libraries before they cause you trouble and you can't tell why)

$rvm install 1.9.2-p318
$gem install heroku -v '2.2.8' --no-ri --no-rdoc
$gem install taps pg --no-ri --no-rdoc`

for the record my taps is (0.3.24) and pg (0.14.1)

$rvm use 1.9.2-p318

This is what worked for me.

$~/.rvm/gems/ruby-1.9.2-p318/gems/heroku-2.2.8/bin/heroku db:push
like image 125
iNulty Avatar answered Feb 04 '26 02:02

iNulty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!