I have been trying to set up my ruby on rails dev environment for a project I just started working on. I have installed Ruby 1.9.3, Rails 3.2, and postgresql 9.1.4 on Ubuntu 12, and when I try rake db:create:all I get the message:
/var/lib/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize': could not connect to server: No such file or directory (NameError)
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I then added:
host: localhost
port: 5432
to my database.yml file, which let me do db:create:all and db:migrate, but when I run the rails server locally it still has the same error.
I have checked that the postgresql server is running, which it is (I also know it is running since rake worked earlier), and have tried a fresh install of postgresql. What might I be missing to make this work?