Reputation: 35
I just installed PostgreSQL with homebrew:
$ brew install postgresql
I installed the pg gem with:
$ gem install pg -- --with-pg-config= '/usr/local/var/postgres/postgresql.conf'
I changed my app's database.yml to
development:
adapter: postgresql
encoding: unicode
database: rails_dev
pool: 5
username: vise890
password:
test:
adapter: postgresql
encoding: unicode
database: rails_test
pool: 5
username: vise890
password:
production:
adapter: postgresql
encoding: unicode
database: ddb
port: 5432
pool: 5
username: postgres
password: admin
However, whenever i load any page I get the error:
ActiveRecord::ConnectionNotEstablished
I can connect to the db with pgAdmin (u:vise890 P:{none}) and i see the databases.
I am doing example3 from the Ruby on Rails Tutorial
If you want to check the whole thing: Sample App github branch
Thanks in advance guys!
Upvotes: 2
Views: 3317
Reputation: 35
Ok, nevermind. I started from scratch and it worked. Here's the walkthrough in case you are interested
Upvotes: 1