One month and still errors!


#1

I followed the Cloud9 help page for postgresql, but that didn’t work, I have created 25 work spaces now and nothing seems to work, all i’m trying to do is follow the ruby on rails tutorial and can’t get passed the third lesson, all works fine with SQlite3, until you try and push to heroku and then all goes SOUTH, boy this is fun.
Puma caught this error: could not connect to server: Connection refused
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host “localhost” (127.0.0.1) and accepting
TCP/IP connections on port 5432?
(PG::ConnectionBad)
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in initialize' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:innew’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in connect' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:217:ininitialize’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in new' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:inpostgresql_connection’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:721:in new_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:765:incheckout_new_connection’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:744:in try_to_checkout_new_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:705:inacquire_connection’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:501:in checkout' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:inconnection’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:877:in retrieve_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_handling.rb:128:inretrieve_connection’
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/connection_handling.rb:91:in connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.rc1/lib/active_record/query_cache.rb:47:inblock in install_executor_hooks’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:396:in instance_exec' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:396:inblock in make_lambda’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:169:in block (2 levels) in halting' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:547:inblock (2 levels) in default_terminator’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:546:in catch' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:546:inblock in default_terminator’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:170:in block in halting' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:454:inblock in call’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:454:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:454:incall’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:101:in __run_callbacks__' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:750:in_run_complete_callbacks’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/callbacks.rb:90:in run_callbacks' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/execution_wrapper.rb:107:incomplete!’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/execution_wrapper.rb:64:in ensure in block in run!' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/execution_wrapper.rb:64:inblock in run!’
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/execution_wrapper.rb:58:in tap' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc1/lib/active_support/execution_wrapper.rb:58:inrun!’
/usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/executor.rb:10:in call' /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/static.rb:136:incall’
/usr/local/rvm/gems/ruby-2.3.0/gems/rack-2.0.0.rc1/lib/rack/sendfile.rb:111:in call' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc1/lib/rails/engine.rb:522:incall’
/usr/local/rvm/gems/ruby-2.3.0/gems/puma-3.4.0/lib/puma/configuration.rb:224:in call' /usr/local/rvm/gems/ruby-2.3.0/gems/puma-3.4.0/lib/puma/server.rb:569:inhandle_request’
/usr/local/rvm/gems/ruby-2.3.0/gems/puma-3.4.0/lib/puma/server.rb:406:in process_client' /usr/local/rvm/gems/ruby-2.3.0/gems/puma-3.4.0/lib/puma/server.rb:271:inblock in run’
/usr/local/rvm/gems/ruby-2.3.0/gems/puma-3.4.0/lib/puma/thread_pool.rb:114:in `block in spawn_thread’


#2

It appears to be a port issue. Maybe try using one of the 3 public ports: 8080, 8081, 8082.


#3

rails s -b $IP -p $PORT
this uses post 8080


#4

And if you change it in Postgresql, another error comes up!!


#5

Resolved:
Installed both Ruby and Rails using another URL, as you would install on your personal computer and it worked.

Cloud9 won’t except certain commands to configure Postgresql!!