質問

I'm using nitrous on a PC (Windows 7), and having trouble connecting to the server (using ruby on rails). It worked perfectly yesterday (same project, same computer).

The error I'm getting:

psql: could not connect to server: No such file or directory                                                                                             
        Is the server running locally and accepting                                                                                                      
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

My database.yml file:

development:
  adapter: postgresql
  database: mvp_development

test:
  adapter: postgresql
  database: mvp_test

I've confirmed that my Gemfile does contain 'pg', tried running bundle update and bundle install, uninstalling pg and running bundle install, and running gem pristine pg.

役に立ちましたか?

解決

Make sure you're starting the postgresql server. If your box has been shutdown then the process will get killed so you need to restart.

You can do this using the parts start postgresql command in the console.

There will be paid plans in the near future that allow you to keep your box alive indefinitely so you won't need to restart postgresql and other services everytime you sign in.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top