【问题标题】:PG gem errors on attempting to make connection尝试建立连接时的 PG gem 错误
【发布时间】:2010-07-19 22:03:14
【问题描述】:

我已经按照 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 安装成功,但出现上述错误。

有什么想法吗?

【问题讨论】:

  • 运行gem install activerecord-postgresql-adapter时会发生什么?
  • 该 gem 不存在/不再受支持

标签: ruby-on-rails postgresql


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2018-06-24
    • 1970-01-01
    • 2020-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-03
    • 2011-07-15
    相关资源
    最近更新 更多