heroku db:push not working, using taps gem

柔情痞子 提交于 2019-12-12 11:35:37

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/10472728/heroku-dbpush-not-working-using-taps-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!