I can not set up a Rails app using Postgresql for development on Cloud9 (c9.io): the migration does not succeed.
Common error:
~/workspace (master) $ rake db:migrate
rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "0.0.0.0" and accepting
TCP/IP connections on port 5432?
Cloud9 does not run PG by defalut. Below is the fast & easy way I use to use Postgresql on C9:
1. Gemfile.rb:
2. Database.yml:
`
Done! However after not using the app for some hours the db goes to sleep & you have to "switch" Postgres on manually by typing in the console:
sudo service postgresql start