user1010101 user1010101 - 4 months ago 6
Ruby Question

Rails app on Heroku deployed successfully but does not run query

I have a small rails application that takes users start and end address and returns a list of buses they can take based on that. I am very new to rails and i have deployed app to heroku first time. After deploying app on heroku i was able to successfully migrate tables, and also run seed to populate data. Then as usual i entered a start and end address. After hitting submit i get message telling me to check my logs. So I run heroku logs and this is what i get.

2015-04-30T14:17:48.446444+00:00 heroku[web.1]: Unidling
2015-04-30T14:17:48.446877+00:00 heroku[web.1]: State changed from down to starting
2015-04-30T14:17:52.168701+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 12499 -e production`
2015-04-30T14:17:57.481206+00:00 app[web.1]: [2015-04-30 14:17:57] INFO ruby 2.0.0 (2015-04-13) [x86_64-linux]
2015-04-30T14:17:57.481180+00:00 app[web.1]: [2015-04-30 14:17:57] INFO WEBrick 1.3.1
2015-04-30T14:17:57.481653+00:00 app[web.1]: [2015-04-30 14:17:57] INFO WEBrick::HTTPServer#start: pid=3 port=12499
2015-04-30T14:17:57.638080+00:00 heroku[web.1]: State changed from starting to up
2015-04-30T14:17:58.565914+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-04-30T14:17:58.565916+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-04-30T14:17:58.565917+00:00 app[web.1]: Started GET "/" for 149.125.112.151 at 2015-04-30 14:17:58 +0000
2015-04-30T14:17:58.565906+00:00 app[web.1]: => Booting WEBrick
2015-04-30T14:17:58.565912+00:00 app[web.1]: => Rails 4.2.0 application starting in production on http://0.0.0.0:12499
2015-04-30T14:17:59.867086+00:00 app[web.1]: Processing by WelcomeController#index as HTML
2015-04-30T14:17:59.891868+00:00 app[web.1]: Rendered welcome/index.html.erb within layouts/application (2.2ms)
2015-04-30T14:17:59.868011+00:00 app[web.1]: Geokit is using the domain: herokuapp.com
2015-04-30T14:17:59.893573+00:00 app[web.1]: Completed 200 OK in 26ms (Views: 14.6ms | ActiveRecord: 0.0ms)
2015-04-30T14:17:59.901196+00:00 heroku[router]: at=info method=GET path="/" host=polar-oasis-8863.herokuapp.com request_id=f3885684-e8cc-4893-939d-8dd304ba81b2 fwd="149.125.112.151" dyno=web.1 connect=2ms service=1399ms status=200 bytes=5771
2015-04-30T14:18:00.810210+00:00 heroku[router]: at=info method=GET path="/assets/application-b598aa7e82e5647cd54ae6f409306995766dd0ce1af586bab9ebe84804d0eec0.js" host=polar-oasis-8863.herokuapp.com request_id=c938b44d-1080-477d-84a3-8d57f6669641 fwd="149.125.112.151" dyno=web.1 connect=2ms service=4ms status=304 bytes=133
2015-04-30T14:18:00.777510+00:00 heroku[router]: at=info method=GET path="/assets/application-f555cdb8fe7a4aae0af385703ab6d5cadb675ef7c341889cc462321abdfcda80.css" host=polar-oasis-8863.herokuapp.com request_id=682e9193-193f-4a3f-8a2f-621a365e711d fwd="149.125.112.151" dyno=web.1 connect=3ms service=7ms status=304 bytes=133
2015-04-30T14:18:01.019483+00:00 heroku[router]: at=info method=GET path="/css/bootstrap.min.css" host=polar-oasis-8863.herokuapp.com request_id=5d5b09c4-acb1-488e-8705-382ee61909aa fwd="149.125.112.151" dyno=web.1 connect=1ms service=209ms status=200 bytes=125647
2015-04-30T14:18:15.570748+00:00 app[web.1]: Google geocoding. Result: %7B%0A+++%22results%22+%3A+%5B%0A++++++%7B%0A+++++++++%22address_components%22+%3A+%5B%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%2212%22%2C%0A+++++++++++++++%22short_name%22+%3A+%2212%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22street_number%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Goethe+Street%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Goethe+St%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22route%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Binghamton%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Binghamton%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22locality%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Broome+County%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Broome+County%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22administrative_area_level_2%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22New+York%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22NY%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22administrative_area_level_1%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22United+States%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22US%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22country%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%2213905%22%2C%0A+++++++++++++++%22short_name%22+%3A+%2213905%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22postal_code%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%223506%22%2C%0A+++++++++++++++%22short_name%22+%3A+%223506%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22postal_code_suffix%22+%5D%0A++++++++++++%7D%0A+++++++++%5D%2C%0A+++++++++%22formatted_address%22+%3A+%2212+Goethe+Street%2C+Binghamton%2C+NY+13905%2C+USA%22%2C%0A+++++++++%22geometry%22+%3A+%7B%0A++++++++++++%22location%22+%3A+%7B%0A+++++++++++++++%22lat%22+%3A+42.103973%2C%0A+++++++++++++++%22lng%22+%3A+-75.93345699999999%0A++++++++++++%7D%2C%0A++++++++++++%22location_type%22+%3A+%22ROOFTOP%22%2C%0A++++++++++++%22viewport%22+%3A+%7B%0A+++++++++++++++%22northeast%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.1053219802915%2C%0A++++++++++++++++++%22lng%22+%3A+-75.93210801970848%0A+++++++++++++++%7D%2C%0A+++++++++++++++%22southwest%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.1026240197085%2C%0A++++++++++++++++++%22lng%22+%3A+-75.9348059802915%0A+++++++++++++++%7D%0A++++++++++++%7D%0A+++++++++%7D%2C%0A+++++++++%22place_id%22+%3A+%22ChIJkzQDmQ_v2okRY-0uinzqENo%22%2C%0A+++++++++%22types%22+%3A+%5B+%22street_address%22+%5D%0A++++++%7D%0A+++%5D%2C%0A+++%22status%22+%3A+%22OK%22%0A%7D%0A
2015-04-30T14:18:15.609517+00:00 app[web.1]: Google geocoding. Result: %7B%0A+++%22results%22+%3A+%5B%0A++++++%7B%0A+++++++++%22address_components%22+%3A+%5B%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Binghamton+University%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Binghamton+University%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22establishment%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%224400%22%2C%0A+++++++++++++++%22short_name%22+%3A+%224400%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22street_number%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Vestal+Parkway+East%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Vestal+Pkwy+E%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22route%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Binghamton%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Binghamton%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22locality%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Vestal%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Vestal%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22administrative_area_level_3%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22Broome+County%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22Broome+County%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22administrative_area_level_2%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22New+York%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22NY%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22administrative_area_level_1%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%22United+States%22%2C%0A+++++++++++++++%22short_name%22+%3A+%22US%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22country%22%2C+%22political%22+%5D%0A++++++++++++%7D%2C%0A++++++++++++%7B%0A+++++++++++++++%22long_name%22+%3A+%2213902%22%2C%0A+++++++++++++++%22short_name%22+%3A+%2213902%22%2C%0A+++++++++++++++%22types%22+%3A+%5B+%22postal_code%22+%5D%0A++++++++++++%7D%0A+++++++++%5D%2C%0A+++++++++%22formatted_address%22+%3A+%22Binghamton+University%2C+4400+Vestal+Parkway+East%2C+Binghamton%2C+NY+13902%2C+USA%22%2C%0A+++++++++%22geometry%22+%3A+%7B%0A++++++++++++%22bounds%22+%3A+%7B%0A+++++++++++++++%22northeast%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.0956999%2C%0A++++++++++++++++++%22lng%22+%3A+-75.95752920000001%0A+++++++++++++++%7D%2C%0A+++++++++++++++%22southwest%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.0814946%2C%0A++++++++++++++++++%22lng%22+%3A+-75.98218439999999%0A+++++++++++++++%7D%0A++++++++++++%7D%2C%0A++++++++++++%22location%22+%3A+%7B%0A+++++++++++++++%22lat%22+%3A+42.088828%2C%0A+++++++++++++++%22lng%22+%3A+-75.96697209999999%0A++++++++++++%7D%2C%0A++++++++++++%22location_type%22+%3A+%22APPROXIMATE%22%2C%0A++++++++++++%22viewport%22+%3A+%7B%0A+++++++++++++++%22northeast%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.0956999%2C%0A++++++++++++++++++%22lng%22+%3A+-75.95752920000001%0A+++++++++++++++%7D%2C%0A+++++++++++++++%22southwest%22+%3A+%7B%0A++++++++++++++++++%22lat%22+%3A+42.0814946%2C%0A++++++++++++++++++%22lng%22+%3A+-75.98218439999999%0A+++++++++++++++%7D%0A++++++++++++%7D%0A+++++++++%7D%2C%0A+++++++++%22place_id%22+%3A+%22ChIJaTEedLju2okR3z5p7vGc53M%22%2C%0A+++++++++%22types%22+%3A+%5B+%22university%22%2C+%22establishment%22+%5D%0A++++++%7D%0A+++%5D%2C%0A+++%22status%22+%3A+%22OK%22%0A%7D%0A
2015-04-30T14:18:15.574832+00:00 app[web.1]: Google geocoding. address: Binghamton University, Vestal Parkway East, Binghamton, NY, United States, args []
2015-04-30T14:18:15.435864+00:00 app[web.1]: Processing by WelcomeController#create as HTML
2015-04-30T14:18:15.435917+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"Z8XgjHvHP81VKxCNaByRSmQJ5x+l03+WoujaZv/u4LFRdHN3E9n1eAZYnrIDsfMhwQ+ios9MzX/ikmvF8qCOgQ==", "address"=>"12 Goethe St, Binghamton, NY, United States", "destaddress"=>"Binghamton University, Vestal Parkway East, Binghamton, NY, United States", "commit"=>"Find Buses"}
2015-04-30T14:18:15.432864+00:00 app[web.1]: Started POST "/welcome/index" for 149.125.112.151 at 2015-04-30 14:18:15 +0000
2015-04-30T14:18:15.436927+00:00 app[web.1]: Multi geocoding. address: 12 Goethe St, Binghamton, NY, United States, args []
2015-04-30T14:18:15.436688+00:00 app[web.1]: Geokit is using the domain: herokuapp.com
2015-04-30T14:18:15.574774+00:00 app[web.1]: Multi geocoding. address: Binghamton University, Vestal Parkway East, Binghamton, NY, United States, args []
2015-04-30T14:18:15.437011+00:00 app[web.1]: Google geocoding. address: 12 Goethe St, Binghamton, NY, United States, args []
2015-04-30T14:18:16.206604+00:00 app[web.1]: SIN(0.7348529570207945)*SIN(RADIANS(stops.latitude))))*3963.1899999999996)
2015-04-30T14:18:16.206606+00:00 app[web.1]: ASC LIMIT 1
2015-04-30T14:18:16.206591+00:00 app[web.1]: Stop Load (592.5ms) SELECT "stops".* FROM "stops" ORDER BY
2015-04-30T14:18:16.206599+00:00 app[web.1]: (ACOS(least(1,COS(0.7348529570207945)*COS(-1.3252888370715357)*COS(RADIANS(stops.latitude))*COS(RADIANS(stops.longitude))+
2015-04-30T14:18:16.206603+00:00 app[web.1]: COS(0.7348529570207945)*SIN(-1.3252888370715357)*COS(RADIANS(stops.latitude))*SIN(RADIANS(stops.longitude))+
2015-04-30T14:18:16.968727+00:00 app[web.1]: Stop Load (9.6ms) SELECT "stops".* FROM "stops" ORDER BY
2015-04-30T14:18:16.968739+00:00 app[web.1]: COS(0.7345886269055799)*SIN(-1.3258737859156708)*COS(RADIANS(stops.latitude))*SIN(RADIANS(stops.longitude))+
2015-04-30T14:18:16.968737+00:00 app[web.1]: (ACOS(least(1,COS(0.7345886269055799)*COS(-1.3258737859156708)*COS(RADIANS(stops.latitude))*COS(RADIANS(stops.longitude))+
2015-04-30T14:18:16.968741+00:00 app[web.1]: SIN(0.7345886269055799)*SIN(RADIANS(stops.latitude))))*3963.1899999999996)
2015-04-30T14:18:16.968743+00:00 app[web.1]: ASC LIMIT 1
2015-04-30T14:18:16.981001+00:00 app[web.1]: Stop Load (3.3ms) SELECT "stops".* FROM "stops" WHERE "stops"."id" = $1 LIMIT 1 [["id", 14]]
2015-04-30T14:18:17.029400+00:00 app[web.1]: Completed 500 Internal Server Error in 1593ms
2015-04-30T14:18:16.983127+00:00 app[web.1]: Stop Load (1.4ms) SELECT "stops".* FROM "stops" WHERE "stops"."id" = $1 LIMIT 1 [["id", 1]]
2015-04-30T14:18:17.083340+00:00 app[web.1]:
2015-04-30T14:18:17.094117+00:00 heroku[router]: at=info method=POST path="/welcome/index" host=polar-oasis-8863.herokuapp.com request_id=e8ce331f-e205-48b9-a49a-fd1c83ea11c8 fwd="149.125.112.151" dyno=web.1 connect=2ms service=1673ms status=500 bytes=1754
2015-04-30T14:18:17.083360+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
2015-04-30T14:18:17.083352+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
2015-04-30T14:18:17.083354+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
2015-04-30T14:18:17.083357+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
2015-04-30T14:18:17.083359+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
2015-04-30T14:18:17.083362+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
2015-04-30T14:18:17.083364+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
2015-04-30T14:18:17.083346+00:00 app[web.1]: PG::ConnectionBad (fe_sendauth: no password supplied
2015-04-30T14:18:17.083348+00:00 app[web.1]: ):
2015-04-30T14:18:17.083350+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
2015-04-30T14:18:17.083373+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
2015-04-30T14:18:17.083374+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
2015-04-30T14:18:17.083376+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2015-04-30T14:18:17.083370+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
2015-04-30T14:18:17.083378+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
2015-04-30T14:18:17.083371+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2015-04-30T14:18:17.083383+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
2015-04-30T14:18:17.083386+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:43:in `rescue in call'
2015-04-30T14:18:17.083388+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:31:in `call'
2015-04-30T14:18:17.083389+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
2015-04-30T14:18:17.083391+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2015-04-30T14:18:17.083393+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
2015-04-30T14:18:17.083394+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
2015-04-30T14:18:17.083356+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
2015-04-30T14:18:17.083397+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
2015-04-30T14:18:17.083398+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2015-04-30T14:18:17.083400+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2015-04-30T14:18:17.083401+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2015-04-30T14:18:17.083396+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
2015-04-30T14:18:17.083380+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
2015-04-30T14:18:17.083381+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
2015-04-30T14:18:17.083385+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:51:in `restore_query_cache_settings'
2015-04-30T14:18:17.083403+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2015-04-30T14:18:17.083405+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
2015-04-30T14:18:17.083406+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
2015-04-30T14:18:17.083408+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2015-04-30T14:18:17.085201+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
2015-04-30T14:18:17.085205+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
2015-04-30T14:18:17.085207+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2015-04-30T14:18:17.085208+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call'
2015-04-30T14:18:17.085210+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'
2015-04-30T14:18:17.085204+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
2015-04-30T14:18:17.085236+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/handler/webrick.rb:89:in `service'
2015-04-30T14:18:17.085238+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2015-04-30T14:18:17.085239+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2015-04-30T14:18:17.085216+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
2015-04-30T14:18:17.085211+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2015-04-30T14:18:17.085213+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in `call'
2015-04-30T14:18:17.085214+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call'
2015-04-30T14:18:17.085217+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
2015-04-30T14:18:17.085235+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/content_length.rb:15:in `call'
2015-04-30T14:18:17.085218+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'
2015-04-30T14:18:17.085241+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2015-04-30T14:18:17.085242+00:00 app[web.1]:
2015-04-30T14:18:17.085244+00:00 app[web.1]:


I am not sure what this error is about at all.

Following is my database.yml File

# MySQL. Versions 5.0+ are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
#
default: &default
adapter: postgresql
encoding: utf8
pool: 5
username: root
password:
# socket: /tmp/mysql.sock

development:
<<: *default
database: BingBus_development

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: BingBus_test

# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="ec2-23-21-140-156.compute-1.amazonaws.com"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production:
<<: *default
database: BingBus_production
username: BingBus
password: <%= ENV['BINGBUS_DATABASE_PASSWORD'] %>


The log seems to be running my query too but for some reason there is an error. I HAVE no idea why. I am so close i know but i am missing something. I WOULD be very grateful if someone can help me here.

Answer

Assuming you're using Heroku Postgres, remove this part:

production:
  <<: *default
  database: BingBus_production
  username: BingBus
  password: <%= ENV['BINGBUS_DATABASE_PASSWORD'] %>

Heroku sets up the database and configures your rails app automatically.