Problem with Postgresql `initialize` ... Socket.s.PGSQL.5432

There were several messages in this problem, unfortunately, none of the solutions worked for me.

My suspicion is that my postgresql is either not working or it is configured incorrectly.

That's where I am, I have a development project that I joined, they use postgresql. Here is my step:

  • Cloned repo
  • Changed the name config / database.yml.sample β†’ database.yml
  • Changed the name config / s3.yml.sample β†’ s3.yml
  • Install Ran bundle
  • Ran Rake db: migrate

leads to this error:

rake is interrupted! Failed to connect to the server: there is no such file or directory. The server runs locally and accepts connections in the Unix juice of the domain "/var/pgsql_socket/.s.PGSQL.5432"?

Here's what my files look like: Database.yml

development: adapter: postgresql encoding: unicode database: rentsnapper_development pool: 5 username: user Password:

test: & test adapter: postgresql encoding: unicode database: rentsnapper_test pool: 5 username: user password: cucumber: <: * test

And my s3.yml

defaults: & defaults access_key_id:
secret_access_key: development: <: * default photos_bucket: rentsnapper-photos-development

Solutions Tested:

Just like a side question, which may or may not be appropriate, linux tells me that β€œruby-1.9.3-p385 is not installed”, I run ruby-1.9.3-p362, I suspect it is not connected, Is that I need to update or I can go through with my current version.

Thanks in extended ...

+4
source share
1 answer

SOLVED: I had to fix the database.yml file. Added "host: localhost" got the user and password strings.

development: adapter: postgresql encoding: unicode database: rentsnapper_development pool: 5 host: localhost

test: & test adapter: postgresql encoding: unicode database: rentsnapper_test pool: 5 host: localhost

Cucumber: <: * test

+3
source

Source: https://habr.com/ru/post/1483638/


All Articles