heroku db:推不工作,使用水龙头宝石 [英] heroku db:push not working, using taps gem
问题描述
我使用
gem'sqlite3','1.3.5'
在开发版和
gem'pg'上, '0.12.2'
on prod。
ruby version ruby 1.9.3p125(2012-02-16)[i386-mingw32]
我已经安装了水龙头
gem并试过了heroku db:push和这是我得到的。
HTTP代码:500
点击服务器错误:PGError:错误:时区位移超出范围:2012-0
5-06 12:00:00.000000 + 5894529600
以下是 heroku日志以及。什么是解决方案?
FYI:db:pull工作得很好。我也检查了其他类似的帖子,但截至目前,我无法在其中找到任何解决方案。 解决方案
到Ruby 1.9.3的点击错误。
我相信解决方案是在本地机器上切换到Ruby 1.9.2 在推送数据库文件之前。像这样:
rvm use ruby-1.9.2
heroku db:push
rvm use ruby- 1.9.3
我做我的db:按这种方式推动它,它适用于我。
请注意,您的heroku应用中的ruby版本没有什么区别。在本地运行1.9.3时会出现问题。
以下是github中问题的链接:
https://github.com/ricardochimal/taps/issues/92
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
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
这篇关于heroku db:推不工作,使用水龙头宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!