Is the server running on host localhost (::1) and accepting TCP/IP connections on port 5432?
You most likely ran out of battery and your postgresql server didn't shutdown correctly.
The easiest workaround is to download the official postgresql app and launch it: it will force the server to start (http://postgresapp.com/)
connection to server at localhost , port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?
The problem is that /etc directory needs to be root user, so I changed it to root user, and opened 5432 port, in my case /etc directory owned by other user, now everything is working.
Rails in linux. Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432?
Looks like your postgres is listening on a unix socket (a special kind of file), not a tcp one.
You can try connecting via that socket (location on your system will probably be different, you need the directory where .s.PGSQL.5432
file is located):
# database.yml
host: '/var/run/postgresql'
database: ...
Related Topics
Rails Assets:Precompile Yarn Executable Was Not Detected in the System
Ruby: "Gem Install Bundler" Not Installing Bundler
Correct Way to Populate an Array with a Range in Ruby
Gem Install Fails with Openssl Failure
Rails: Is There a Rails Trick to Adding Commas to Large Numbers
Block Comments in HTML.Erb Templates in Rails
Ruby - Share Logger Instance Among Module/Classes
How to Have Class.Property = X Return Something Other Than X
What Does the '&' Mean in the Following Ruby Syntax
Creating Draft via Google Gmail API
Recommended Development Web Server for Ruby on Rails 3
Setting Up Rake-Pipeline for Use with Handlebars Alongside Google App Engine
Create a Devise User from Ruby Console
Extending Devise Sessionscontroller to Authenticate Using JSON
How to Write Postgresql Functions on Ruby on Rails
Ruby: Parsing a String Representation of Nested Arrays into an Array