尝试建立连接时PG gem错误

时间:2010-07-19 22:03:14

标签: ruby-on-rails postgresql

我已根据RobbyOnRails安装指南通过MacPorts安装了Postgres 8.4.4。当我尝试连接到项目时,我收到以下错误:

establish_connection':RuntimeError: Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (dlopen(/Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle, 9): no suitable image found.  Did find:
    /Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle)

PG gem成功安装,但会产生上述错误。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

问题是没有从所有位置卸载PG gem。一旦我强制卸载路径,一切似乎都有效。