These are chat archives for ged/ruby-pg

31st
Jul 2018
andrea
@da-edra
Jul 31 2018 01:17
Hello, I'm having a problem with pg gem in a Rails project.

If I try to create a project with:
rails new spina_example --database=postgresql
Then cd to spina_example
And then bin/rails db:create

I get this error:
https://gist.github.com/da-edra/0b68baf9d3dfdc53c4050fa5a5b4a2ee

I've Googled the error already with no luck from the Stack Overflow and other websites solutions.
andrea
@da-edra
Jul 31 2018 01:44
What could be the cause of this problem and how can I solve it?
I'm using Arch Linux with Ruby 2.5.0 and Rails 5.2
pg 1.0.0
Lars Kanis
@larskanis
Jul 31 2018 05:18
@da-edra
You
Lars Kanis
@larskanis
Jul 31 2018 05:27
need to set the host in your database.yml file. Look for postgresql.conf in /etc. It should specify the Unix domain socket to be used. Alternatively you can use a TCP connection by host: localhost .