Search code examples
ruby-on-railsruby-on-rails-3herokutaps

heroku db:push not working, using taps gem


I use gem 'sqlite3', '1.3.5' on dev and gem 'pg', '0.12.2' on prod. ruby version ruby 1.9.3p125 (2012-02-16) [i386-mingw32]

for a tutorial app am developing.

I installed taps gem and tried heroku db:push and this is what I got.

HTTP CODE: 500
Taps Server Error: PGError: ERROR:  time zone displacement out of range: "2012-0
5-06 12:00:00.000000+5894529600"

Here is the heroku log as well. What is the solution?

FYI: db:pull works very well. I have also checked other similar posts but as of now I couldn't find the solution in any of them


Solution

  • This is due to a taps bug with Ruby 1.9.3.

    The solution, I believe, is to switch to Ruby 1.9.2 on your local machine prior to pushing the db files. Like this:

    rvm use ruby-1.9.2
    heroku db:push
    rvm use ruby-1.9.3
    

    I do my db:pushes this way and it works for me.

    Note that the version of ruby on your heroku app doesn't make a difference. The problem happens when you are running 1.9.3 locally.

    Here's a link to the issue in github:

    https://github.com/ricardochimal/taps/issues/92