0

I am having an issue while trying to connect with a PG database in my Rails application:

  1. I've create my new app with the following command:

    $ rails new -d postgresql myApp
    
  2. The application was created successfully. Therefore I proceed with the following command:

     $ createuser --createdb --login -P myApp
    

    The prompt asks me a password for a new role. I enter the password and re-enter it for confirmation. This the message I get after entering the password:

      createuser: could not connect to database postgres: 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"?
    

Any help? I am using PG version 9.5.3 and Ruby on Rails version 4.2.4

Sandro Palmieri
  • 1,193
  • 2
  • 12
  • 26

0 Answers0