{"action":"opened","issue":{"url":"https://api.github.com/repos/gottfrois/dashing-rails/issues/74","labels_url":"https://api.github.com/repos/gottfrois/dashing-rails/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/gottfrois/dashing-rails/issues/74/comments","events_url":"https://api.github.com/repos/gottfrois/dashing-rails/issues/74/events","html_url":"https://github.com/gottfrois/dashing-rails/issues/74","id":75667955,"number":74,"title":"Heroku instance doesn't work with database_connection.rb","user":{"login":"digitalWestie","id":454663,"avatar_url":"https://avatars.githubusercontent.com/u/454663?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalWestie","html_url":"https://github.com/digitalWestie","followers_url":"https://api.github.com/users/digitalWestie/followers","following_url":"https://api.github.com/users/digitalWestie/following{/other_user}","gists_url":"https://api.github.com/users/digitalWestie/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalWestie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalWestie/subscriptions","organizations_url":"https://api.github.com/users/digitalWestie/orgs","repos_url":"https://api.github.com/users/digitalWestie/repos","events_url":"https://api.github.com/users/digitalWestie/events{/privacy}","received_events_url":"https://api.github.com/users/digitalWestie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-12T16:56:52Z","updated_at":"2015-05-12T16:56:52Z","closed_at":null,"body":"I have a basic dashing rails app and I've followed the wiki on running dashing-rails on heroku but I get the following error: \r\n\r\n```\r\nPG::ConnectionBad (could not connect to server: No such file or directory\r\n2015-05-12T16:40:18.166407+00:00 app[web.1]: Started GET \"/dashing/\" for 2.120.137.89 at 2015-05-12 16:40:18 +0000\r\n2015-05-12T16:40:18.168457+00:00 app[web.1]: \tconnections on Unix domain socket \"/var/run/postgresql/.s.PGSQL.5432\"?\r\n2015-05-12T16:40:18.168456+00:00 app[web.1]: \tIs the server running locally and accepting\r\n```\r\n\r\nAs an experiment I commented out the database_connection.rb code and it works okay. \r\n\r\n```ruby\r\n=begin\r\nRails.application.config.after_initialize do\r\n  ActiveRecord::Base.connection_pool.disconnect!\r\n\r\n  ActiveSupport.on_load(:active_record) do\r\n    config = Rails.application.config.database_configuration[Rails.env]\r\n    config['reaping_frequency'] = ENV['DB_REAP_FREQ'] || 10 # seconds\r\n    config['pool']              = ENV['DB_POOL']      || 5\r\n    ActiveRecord::Base.establish_connection(config)\r\n  end\r\nend\r\n=end\r\n``` \r\n\r\nHas the same happened to anybody else? Also, could somebody explain a little bit about what the above code does, and if it's needed?"}}