【问题标题】:Activerecord-PostgreSQL Adapter Error [duplicate]Activerecord-PostgreSQL 适配器错误 [重复]
【发布时间】:2010-06-15 20:55:04
【问题描述】:

可能重复:
How to handle Ruby on Rails error: “Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'”

运行“rake db:migrate”时,我收到以下错误:

请安装 postgresql 适配器:gem install activerecord-postgresql-adapter (dlopen(/Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle, 9): 找不到合适的图像。确实找到了: /Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/pg_ext.bundle:mach-o,但架构错误 - /Library/Ruby/Gems/1.8/gems/pg-0.9.0/lib/ pg_ext.bundle)

  1. 使用预构建的映像文件安装 Postgres 8.4.4。
  2. 然后运行sudo gem install pg 安装pg-0.9.0
  3. 配置/database.yml:
    development: adapter: postgresql

有谁知道问题出在哪里?

【问题讨论】:

    标签: ruby-on-rails postgresql


    【解决方案1】:

    问题似乎与我使用 PostgreSQL 的预打包安装有关。我使用 macports 重新安装了 postgresql,效果很好。

    此博客中有很好的说明:

    http://eddorre.com/posts/installing-ruby-on-rails-postgresql-mysql-on-snow-leopard

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多