Rails和Postgres的不相处从MacPorts的转向自制后; PGError:错误:无法识别的时区名称:" UTC" [英] Rails and Postgres aren't getting along after switching from Macports to Homebrew; PGError: ERROR: unrecognized time zone name: "UTC"
问题描述
我感动的一切,我在的/ opt /本地
(其中MacPorts的'东西住)到〜/ .macports
。这包括我的老Postgres数据库集群。
I moved everything that I had in /opt/local
(where Macports' things lived) into ~/.macports
. That included my old postgres database cluster.
然后我安装使用自制的Postgres并运行安装程序,它告诉我(创造的/ usr /本地
一个新的数据库集群)。
Then I installed postgres using Homebrew and ran the setup that it told me to (creating a new database cluster in /usr/local
).
在我的项目,我跑耙分贝:滴:所有
和耙分贝:创建
。这些没有他们愉快地工作。
In my project, I ran rake db:drop:all
and rake db:create
. These did their work cheerfully.
但是,当我试图耙分贝:迁移
,Postgres的和Rails战斗,告诉我
But when I tried to rake db:migrate
, postgres and rails fight and tell me
rake aborted!
PGError: ERROR: unrecognized time zone name: "UTC"
: SET time zone 'UTC'
我不知道他们在说什么,但。我发现<一href="https://rails.lighthouseapp.com/projects/8994/tickets/5324-configtime_zone-not-setting-default_timezone-for-ar-causing-errors-with-postgres"相对=nofollow>关于 config.time_zone
错误这篇文章略有照明,但还不足以找到我的路。
I don't know what they're talking about, though. I found this article about a config.time_zone
bug slightly illuminating, but not enough to find my way.
谢谢!
推荐答案
我不能完全肯定,我怎么修复它,但Postgres的卸载和重新安装它(并按照安装说明它给人非常仔细地)得到它的工作。
I'm not completely sure how I fixed it, but uninstalling Postgres and reinstalling it (and following the setup instructions it gives very carefully) got it working.
这篇关于Rails和Postgres的不相处从MacPorts的转向自制后; PGError:错误:无法识别的时区名称:&QUOT; UTC&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!