views:

186

answers:

1

When running "rake db:migrate", i receive the following error:

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)

  1. Postgres 8.4.4 installed using the pre-built image file.
  2. Then ran sudo gem install pg to install pg-0.9.0
  3. Config/database.yml:
    development: adapter: postgresql

Does anyone know what the problem is?

A: 

The problem seems to be related to the fact that I used the prepackaged install from PostgreSQL. I reinstalled postgresql using macports and it worked great.

Good instructions in this blog:

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

Tian