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

3.4k Views Asked by At

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

2

There are 2 best solutions below

0
On

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
0
On

Just changing the ruby version has not worked for me. I am able to run "heroku db:push" when using the older heroku gem. I basically created a new gemset just for this and made sure it was using the gem version of heroku (not the toolbelt) and everything runs just fine. Hopefully heroku fixes this soon as I'm a big fan of db:push/pull for development.