Reputation: 35
I am trying to run my rails app on heroku. I have deployed successfully after doing an assets:precompile to get rid of some issues caused by bootstrap. I also have done a heroku run rake db:migrate. When opening my app I get an Application Error, specifically status=503 and error=H10.
Here is my heroku log
2014-09-09T22:04:45.055585+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-09-09T22:04:45.055589+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-09-09T22:04:45.055592+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-09-09T22:04:45.055596+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-09-09T22:04:45.055593+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/server.rb:50:in `app'
2014-09-09T22:04:45.055602+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/server.rb:69:in `start'
2014-09-09T22:04:45.055599+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-09-09T22:04:45.055603+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-09-09T22:04:45.055610+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-09-09T22:04:45.055606+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-09-09T22:04:45.055609+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-09-09T22:04:45.055613+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (requi
red)>'
2014-09-09T22:04:45.055615+00:00 app[web.1]: from bin/rails:8:in `require'
2014-09-09T22:04:45.055618+00:00 app[web.1]: from bin/rails:8:in `<main>'
2014-09-09T22:04:45.086736+00:00 app[web.1]: => Booting WEBrick
2014-09-09T22:04:45.749149+00:00 heroku[web.1]: Process exited with status 1
2014-09-09T22:04:45.757909+00:00 heroku[web.1]: State changed from starting to crashed
2014-09-09T22:04:45.758283+00:00 heroku[web.1]: State changed from crashed to starting
2014-09-09T22:04:48.723392+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40097 -e production`
2014-09-09T22:04:51.723638+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
2014-09-09T22:04:51.723658+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-09-09T22:04:51.723676+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-09-09T22:04:51.723790+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-09-09T22:04:51.723805+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-09-09T22:04:51.755978+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-09-09T22:04:51.723636+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:225:in `require_dependency'
2014-09-09T22:04:51.723656+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
2014-09-09T22:04:51.723675+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
2014-09-09T22:04:51.723789+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-09-09T22:04:51.723803+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-09-09T22:04:51.723621+00:00 app[web.1]: class users::allController < Devise::allController
2014-09-09T22:04:51.723643+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:467:in `block in eager_load!'
2014-09-09T22:04:51.723661+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2014-09-09T22:04:51.723681+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
2014-09-09T22:04:51.723793+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-09-09T22:04:51.755972+00:00 app[web.1]: => Rails 4.1.4 application starting in production on http://0.0.0.0:40097
2014-09-09T22:04:51.755980+00:00 app[web.1]: Exiting
2014-09-09T22:04:51.723600+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require': /app/app/controllers/users/all_controller.rb:1: class/module name must be CONSTANT (SyntaxError)
2014-09-09T22:04:51.723639+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:467:in `each'
2014-09-09T22:04:51.723660+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2014-09-09T22:04:51.723679+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
2014-09-09T22:04:51.723792+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-09-09T22:04:51.723806+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-09-09T22:04:51.755974+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-09-09T22:04:51.723626+00:00 app[web.1]: ^
2014-09-09T22:04:51.723645+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:465:in `each'
2014-09-09T22:04:51.723662+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2014-09-09T22:04:51.723684+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
2014-09-09T22:04:51.723795+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-09-09T22:04:51.723808+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-09-09T22:04:51.723631+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
2014-09-09T22:04:51.723650+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application/finisher.rb:58:in `each'
2014-09-09T22:04:51.723669+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2014-09-09T22:04:51.723784+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-09-09T22:04:51.723799+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-09-09T22:04:51.723633+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:348:in `require_or_load'
2014-09-09T22:04:51.723651+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rai
ls/application/finisher.rb:58:in `block in <module:Finisher>'
2014-09-09T22:04:51.723670+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2014-09-09T22:04:51.723786+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-09-09T22:04:51.723800+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-09-09T22:04:51.755966+00:00 app[web.1]: => Booting WEBrick
2014-09-09T22:04:51.723630+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
2014-09-09T22:04:51.723648+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:346:in `eager_load!'
2014-09-09T22:04:51.723667+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2014-09-09T22:04:51.723783+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2014-09-09T22:04:51.723798+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/server.rb:50:in `app'
2014-09-09T22:04:51.723810+00:00 app[web.1]: from bin/rails:8:in `require'
2014-09-09T22:04:51.723628+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
2014-09-09T22:04:51.723647+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:465:in `eager_load!'
2014-09-09T22:04:51.723666+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2014-09-09T22:04:51.723686+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
2014-09-09T22:04:51.723796+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-09-09T22:04:51.723809+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>'
2014-09-09T22:04:51.723635+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:307:in `depend_on'
2014-09-09T22:04:51.723652+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
2014-09-09T22:04:51.723674+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
2014-09-09T22:04:51.723787+00:00 app[web.1]: from /app/config.ru:in `new'
2014-09-09T22:04:51.723802+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/commands/server.rb:69:in `start'
2014-09-09T22:04:51.723812+00:00 app[web.1]: from bin/rails:8:in `<main>'
2014-09-09T22:04:51.755976+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-09-09T22:04:52.493206+00:00 heroku[web.1]: Process exited with status 1
2014-09-09T22:04:52.502892+00:00 heroku[web.1]: State changed from starting to crashed
2014-09-09T22:04:53.571153+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=powerful-scrubland-9818.herokuapp.com request_id=4999439e-9786-4555-a57a-933d885c2f1e fwd="54.82.145.140" dyno= connect= service= status=503 bytes=
2014-09-09T22:04:56.844339+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by [email protected]
2014-09-09T22:05:00.487482+00:00 heroku[run.1716]: Starting process with command `bundle exec rake db:migrate`
2014-09-09T22:05:00.448479+00:00 heroku[run.1716]: Awaiting client
2014-09-09T22:05:00.719502+00:00 heroku[run.1716]: State changed from starting to up
2014-09-09T22:05:04.780344+00:00 heroku[run.1716]: State changed from up to complete
2014-09-09T22:05:04.764625+00:00 heroku[run.1716]: Process exited with status 0
2014-09-09T22:05:09.700119+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by [email protected]
2014-09-09T22:05:13.261146+00:00 heroku[run.3019]: Starting process with command `bundle exec rake db:migrate`
2014-09-09T22:05:13.186468+00:00 heroku[run.3019]: Awaiting client
2014-09-09T22:05:13.583931+00:00 heroku[run.3019]: State changed from starting to up
2014-09-09T22:05:18.478766+00:00 heroku[run.3019]: Process exited with status 0
2014-09-09T22:05:18.497817+00:00 heroku[run.3019]: State changed from up to complete
2014-09-09T22:05:24.001387+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=powerful-scrubland-9818.herokuapp.com request_id=51427254-23d8-45b1-84ef-6d2327163829 fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
2014-09-09T22:05:24.284415+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=powerful-scrubland-9818.herokuapp.com request_id=831be281-88d5-4d09-ba7c-034e163dd63b fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
2014-09-09T22:05:25.591676+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=powerful-scrubland-9818.herokuapp.com request_id=e74f87d6-fe73-4b28-b63d-46c0d8c91dab fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
2014-09-09T22:05:25.799197+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=powerful-scrubland-9818.herokuapp.com request_id=91257b4c-045e-4e59-a91c-e09a97cf5edb fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
2014-09-09T22:05:53.416437+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=powerful-scrubland-9818.herokuapp.com request_id=a638a16c-4dd9-425e-9175-572845ac7732 fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
2014-09-09T22:05:53.799400+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=powerful-scrubland-9818.herokuapp.com request_id=830cefb2-970f-4709-9c39-357bd03a60c7 fwd="50.206.104.35" dyno= connect= service= status=503 bytes=
Edit:Here is the exact syntax error. It is a devise controller. It has not been altered since installing devise.
2014-09-09T22:29:25.827490+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:307:in `depend_on'
2014-09-09T22:29:25.827493+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
2014-09-09T22:29:25.827503+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:346:in `eager_load!'
2014-09-09T22:29:25.827505+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application/finisher.rb:58:in `each'
2014-09-09T22:29:25.827456+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require': /app/app/controllers/users/all_controller.rb:1: class/module name must be CONSTANT (SyntaxError)
2014-09-09T22:29:25.827480+00:00 app[web.1]: class users::allController < Devise::allController
2014-09-09T22:29:25.827482+00:00 app[web.1]: ^
2014-09-09T22:29:25.827499+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:467:in `block in eager_load!'
2014-09-09T22:29:25.827497+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:467:in `each'
2014-09-09T22:29:25.827502+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:465:in `eager_load!'
2014-09-09T22:29:25.827528+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
Upvotes: 1
Views: 147
Reputation: 76774
Naming
Indeed, the error appears to be thus:
/app/app/controllers/users/all_controller.rb:1: class/module name must be CONSTANT (SyntaxError)
class users::allController < Devise::allController
The problem is that you need to use a Constant
name to define / call your controller. Currently, you're not doing this.
Simply, you'll need to do the following:
#app/controllers/users/all_controller.rb
class Users::AllController < Devise::AllController
This is important because Ruby (which Rails is built on), and most other software frameworks / languages in general, call constants at least by using CamelCase; most using FULL_CAPITALIZATION.
Looking at your controller definition, you're calling users::allController
- neither CamelCase or CAPITALIZED.
Devise
Something else you need to consider is the role of Devise.
I've never seen the Devise AllController
anywhere. I may be wrong, but I don't think it has one.
What you're doing is try to superclass a class which likely doesn't exist. So even if you resolve the naming issues with your controller, I believe you'll still hit a wall with the actual class itself.
Because you don't show us the contents of all_controller
, I cannot give you any further recommendations. However, I can say that I believe you'll hit another error leaving it as it is.
Upvotes: 1
Reputation: 11920
Looks like the issue might be with one of your controllers when it tries to load it
app/controllers/users/all_controller.rb:1: class/module name must be CONSTANT (SyntaxError)
I pulled that out of the log, if you post some of that code, may be able to help further, but start by checking there
Upvotes: 1