0

I'm creating my first app and it works perfectly fine locally. It worked fine on production on Heroku for a while but when I made some changes which were CSS mostly, I got an error on Heroku.I tried answers regarding the secrets.yml and routes but no luck. Could someone please help? Here is the log;

2014-12-12T05:10:52.613303+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:166:in `block in halting'
2014-12-12T05:10:52.613309+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_controller/metal/rescue.rb:29:in `process_action'
2014-12-12T05:10:52.613311+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/notifications.rb:159:in `block in instrument'
2014-12-12T05:10:52.613313+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-12-12T05:10:52.613341+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2014-12-12T05:10:52.613350+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/journey/router.rb:59:in `call'
2014-12-12T05:10:52.613357+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-12-12T05:10:52.594036+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-12-12T05:10:52.594043+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/abstract_controller/base.rb:136:in `process'
2014-12-12T05:10:52.594051+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:82:in `call'
2014-12-12T05:10:52.586102+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/core_ext/benchmark.rb:12:in `ms'
2014-12-12T05:10:52.594029+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:86:in `run_callbacks'
2014-12-12T05:10:52.594321+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-12-12T05:10:52.594324+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2014-12-12T05:10:52.613354+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-12-12T05:10:52.613347+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/journey/router.rb:73:in `block in call'
2014-12-12T05:10:52.613351+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:678:in `call'
2014-12-12T05:10:52.613364+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2014-12-12T05:10:52.594057+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/journey/router.rb:59:in `call'
2014-12-12T05:10:52.594060+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-12-12T05:10:52.594064+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-12-12T05:10:52.594090+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-12-12T05:10:52.594305+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-12-12T05:10:52.594316+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-12-12T05:10:52.613349+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/journey/router.rb:59:in `each'
2014-12-12T05:10:52.613362+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2014-12-12T05:10:52.594310+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-12-12T05:10:52.594327+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-12-12T05:10:52.594333+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-12-12T05:10:52.594067+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-12-12T05:10:52.594068+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-12-12T05:10:52.594085+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2014-12-12T05:10:52.594087+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.7/lib/active_record/query_cache.rb:36:in `call'
2014-12-12T05:10:52.594313+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:20:in `block in call'
2014-12-12T05:10:52.594325+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/static.rb:84:in `call'
2014-12-12T05:10:52.594328+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/engine.rb:514:in `call'
2014-12-12T05:10:52.613334+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2014-12-12T05:10:52.613336+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.7/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2014-12-12T05:10:52.613338+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.1.7/lib/action_view/rendering.rb:30:in `process'
2014-12-12T05:10:52.594038+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/notifications.rb:159:in `instrument'
2014-12-12T05:10:52.594050+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_controller/metal.rb:232:in `block in action'
2014-12-12T05:10:52.594056+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/journey/router.rb:59:in `each'
2014-12-12T05:10:52.594318+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:20:in `call'
2014-12-12T05:10:52.586085+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.1.7/lib/action_view/renderer/renderer.rb:42:in `render_template'
2014-12-12T05:10:52.586096+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/abstract_controller/rendering.rb:25:in `render'
2014-12-12T05:10:52.586131+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:229:in `block in halting'
2014-12-12T05:10:52.586078+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.1.7/lib/action_view/path_set.rb:46:in `find'
2014-12-12T05:10:52.586087+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.1.7/lib/action_view/renderer/renderer.rb:23:in `render'
2014-12-12T05:10:52.594025+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:166:in `call'
2014-12-12T05:10:52.594312+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:38:in `call_app'
2014-12-12T05:10:52.594314+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-12-12T05:10:52.594317+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-12-12T05:10:52.613355+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-12-12T05:10:52.613360+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-12-12T05:10:52.613367+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/c
allbacks.rb:82:in `run_callbacks'
2014-12-12T05:10:52.613387+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:38:in `call_app'
2014-12-12T05:10:52.594319+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-12-12T05:10:52.594322+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-12-12T05:10:52.594331+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-12-12T05:10:52.613274+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:113:in `call'
2014-12-12T05:10:52.613280+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/callbacks.rb:229:in `block in halting'
2014-12-12T05:10:52.613358+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/flash.rb:254:in `call'
2014-12-12T05:10:52.594065+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/flash.rb:254:in `call'
2014-12-12T05:10:52.613359+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-12-12T05:10:52.613366+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-12-12T05:10:52.613353+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-12-12T05:10:52.613385+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-12-12T05:10:52.594330+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/application.rb:144:in `call'
2014-12-12T05:10:52.613383+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-12-12T05:10:52.594405+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-12-12T05:10:52.613389+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-12-12T05:10:52.613363+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.7/lib/active_record/query_cache.rb:36:in `call'
2014-12-12T05:10:52.613381+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-12-12T05:10:52.613384+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-12-12T05:10:52.613388+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:20:in `block in call'
2014-12-12T05:10:52.594332+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-12-12T05:10:52.594407+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-12-12T05:10:52.594335+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-12-12T05:10:52.594410+00:00 app[web.1]: 
2014-12-12T05:10:52.598470+00:00 app[web.1]: Started GET "/" for 75.51.144.138 at 2014-12-12 05:10:52 +0000
2014-12-12T05:10:52.613403+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/engine.rb:514:in `call'
2014-12-12T05:10:52.594408+00:00 app[web.1]: 
2014-12-12T05:10:52.606106+00:00 app[web.1]: Completed 500 Internal Server Error in 5ms
2014-12-12T05:10:52.613390+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-12-12T05:10:52.613392+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-12-12T05:10:52.613399+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2014-12-12T05:10:52.613394+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-12-12T05:10:52.613397+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-12-12T05:10:52.613396+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-12-12T05:10:52.613393+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/rack/logger.rb:20:in `call'
2014-12-12T05:10:52.613413+00:00 app[web.1]: 
2014-12-12T05:10:52.613409+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-12-12T05:10:52.613404+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.7/lib/rails/application.rb:144:in `call'
2014-12-12T05:10:52.613411+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-12-12T05:10:52.613412+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-12-12T05:10:52.613400+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.7/lib/action_dispatch/middleware/static.rb:84:in `call'
2014-12-12T05:10:52.613401+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-12-12T05:10:52.613407+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-12-12T05:10:52.613405+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-12-12T05:10:52.613408+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-12-12T05:10:52.613414+00:00 app[web.1]: 

Running the production server locally gives me:

Missing secret_key_base for 'production' environment, set this value in config/secrets.yml

I've added secrets.yml to Git but still no luck.

angelraise
  • 13
  • 1
  • 4

3 Answers3

0

Try running your production code locally to see if you can replicate the error. Type this into your terminal/console:

RAILS_ENV=production rails server

If you don't see the same error on production locally, then I'd guess it's a Heroku-specific error.

user1515295
  • 1,181
  • 11
  • 28
  • Here is the error I get when I run production locally; Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml` I have added the secrets.yml to version control but still can't get it to work. – angelraise Dec 12 '14 at 22:28
  • Do any of these solutions work for the missing secret_key_base? http://stackoverflow.com/questions/23180650/how-to-solve-error-missing-secret-key-base-for-production-environment-on-h – user1515295 Dec 13 '14 at 04:28
  • One solution semi worked. When I generate a key and add it to the production on secrets.yml, it works on production environment locally but not on Heroku. – angelraise Dec 13 '14 at 17:54
  • It seems you have different production environments on Heroku and locally. Can you check your local rails version with "rails -v" and "ruby -v" and compare it to the results for what you get with "heroku run rails -v" and "heroku run ruby -v"? Maybe there are some other things you can check to see if the environments are the same. Additionally, try creating a basic (empty) rails app on Heroku using these instructions: https://devcenter.heroku.com/articles/getting-started-with-rails4 – user1515295 Dec 26 '14 at 07:35
0

I rebuilt the application and now it works fine. I was unable to understand what the exact problem was but I believe it was due to case sensitivity. I might have created a controller with a lowercase letter. As Ruby is case insensitive but Heroku is I believe Heroku was unable to GET the path.

angelraise
  • 13
  • 1
  • 4
0

Heroku reads the secret from an ENV variable, not secrets.yml.

Also, see this previous answer: https://stackoverflow.com/a/21601056/1681953

Community
  • 1
  • 1
Ryan
  • 76
  • 4