Taps Server Error: PGError: ERROR: time zone displacement out of range: "2011-11-15 12:00:00.000000+5894114400"
I run the following command to push the contents of my local database to Heroku:
heroku db:push --app my-app
which uses taps and from my home computer it works flawlessly but from my work computer I get this error:
Taps Server Error: PGError: ERROR: time zone displacement out of range: "2011-11-15 12:00:00.000000+5894114400"
I'm not sure where that date is coming from, I can't find it in the data anywhere. Any ideas what's going on and/or how to fix it?
Thanks.
This seems to happen with Ruby 1.9.3-p0 but not with 1.9.2.
Posted on sequel.
https://github.com/jeremyevans/sequel/issues/405
Same problem here. Ruby v1.9.3
This is a problem due to remote ruby version mismatching. Just use 1.9.2 until heroku updates to 1.9.3.
I can confirm that switching to 1.9.2 locally fixed the issue in my situation.
This is a duplicate of Issue #92. I suggest closing it.
Yes, like jhorn424, i switched back from 1.9.3 to 1.9.2 locally, and the error disappeared
rvm use ruby-1.9.2-p290
heroku db:push
Taps Server Error: PGError: ERROR: time zone displacement out of range: "2012-04-24 12:00:00.000000+5894500800"
Any ideas?
$ rvm install ruby-1.9.2-p318 $ rvm use ruby-1.9.2-p318 $ heroku db:push Resetting sequences
I had the same problem.. the rvm directions from dongriab fixed it.. just after the rvm use cmd you need to put your gems on since its a new ruby install.. sudo gem install heroku --no-ri --no-rdoc sudo gem install taps --no-ri --no-rdoc sudo gem install sqlite3 --no-ri --no-rdoc Then it worked..fa
FYI, I tried setting the Heroku ruby version according to this article: http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/ . I confirmed that it worked to set the ruby version. But I'm still getting this error from taps.
Thanks! resetting my Ruby version to 1.9.2 worked for me :)
Just thought I would note this since I got stuck on this. If you are on Mac OSX Lion and get stuck with errors trying to install Ruby 1.9.2 because of the updated Xcode compiler add this to the end of your version install. rvm install ruby-1.9.2-p318 --with-gcc=clang
Donwgrading ruby to version 1.9.2-p318 worked for me as well :)
Both heroku and my local development envionment are using ruby 1.9.3p194. Still getting this issue.
Downgrading to ruby 1.9.2-p320 locally fixed it.
This is a horrible solution to this problem. Has any other progress been made on this?
if you use bundler beta you cab specify the ruby version in the gemfile, thereby forcing heroku to use whichever ruby version you like (also guarantees local and heroku have same ruby)
bundler version you want is '1.2.0.rc'. Its a git tag so just add github url to bundler's entry in the gemfile.
I also had this issue. Using bundler 1.2.0.rc with the ruby '1.9.3' directive didn't solve it. I checked and both remote and local Ruby were 1.9.3-p194.
I was able to work around the issue by installing ruby 1.9.2:
$ rbenv install 1.9.2-p318
$ rbenv local 1.9.2-p318
$ gem install heroku
$ gem install sqlite3
$ gem install taps
$ heroku db:push
You probably haven't setup the PATH correctly, just look at the guide @lohsu mentioned. To verify, run heroku run "ruby -v" and make sure that you have the matching ruby version.
This is a non taps issue and should be closed.
Same as hale, I am running 1.9.3p194 both locally and on heroku
Only difference is heroku lists it as 1.9.3p194 and locally with rvm its listed as ruby-1.9.3-p194 I don't think that would matter though.
It fails, but just switching locally back to 1.9.2 and leaving heroku on 1.9.3 and it works.
Still an issue with 1.9.3p194 even after heroku added support for ruby version in the gem file.
Worked for me downgrading my ruby to 1.9.2, reinstalling heroku and taps gems and forcing ruby on Gemfile to 1.9.2 (to use with heroku).
I'd like to see this issue solved, running ruby 1.9.3p194 both on Heroku and locally.
Downgrading worked for me also.
rvm use 1.9.2 # => ruby-1.9.2-p290
heroku db:push
I've also experienced this issue and upgrading / downgrading both local and heroku ruby versions (1.9.2 and 1.9.3) did not solve the problem.
Looking at the original error message:
Taps Server Error: PGError: ERROR: time zone displacement out of range:
"2012-10-09 12:00:00.000000+5894904000"
It seems obvious that something is actually wrong with the way dates are getting converted during the process.
The actual value of the date field in my case was: "2012-10-09 02:35:34"
What part of the process is causing this change to happen?
It wasn't working for me even when I downgraded to 1.9.2. I had to install the heroku gem (I only had the toolbelt installed) and then heroku db:push worked with 1.9.2.
Note that this happens with 1.9.2p320 as well.
It worked when I went from 1.9.3 to ruby 1.9.2p320.