Question

If anyone can point me in the right direction to help launch my rails app on Heroku, your help would be greatly appreciated.

My app works locally and uses the following:

  • rails 1.9.3
  • mongodb
  • mongoid
  • thin
  • bootstrap

The Heroku logs indicate that the app can't find action_mailer/railties.

2013-10-28T20:49:47.386564+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 43598`
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from config.ru:3:in `require'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/rack/builder.rb:51:in `initialize'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from config.ru:1:in `new'
2013-10-28T20:49:49.024650+00:00 app[web.1]: /app/config/application.rb:4:in `require': cannot load such file -- action_mailer/railtie (LoadError)
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from /app/config/application.rb:4:in `<top (required)>'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from /app/config/environment.rb:4:in `require'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from /app/config/environment.rb:4:in `<top (required)>'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/rack/builder.rb:51:in `instance_eval'
2013-10-28T20:49:49.024650+00:00 app[web.1]:    from config.ru:1:in `<main>'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-10-28T20:49:49.024857+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-10-28T20:49:50.422948+00:00 heroku[web.1]: Process exited with status 1
2013-10-28T20:49:50.435779+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-28T20:50:56.997008+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:50:30.641927+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:50:56.451159+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:50:51.845854+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=

I commented out in application.rb all the required railties files (not just action_mailer; none of them worked), but now I get another error. I think there is another problem and not railties that I am missing.

2013-10-28T20:53:51.478459+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 49593`
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.12/lib/active_support/inflector/methods.rb:123:in `each'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:414:in `each'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/application/railties.rb:8:in `all'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/application/railties.rb:8:in `each'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.12/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/initializable.rb:30:in `run'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.12/lib/active_support/inflector/methods.rb:123:in `constantize'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:416:in `each'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:412:in `eager_load!'
2013-10-28T20:54:22.594177+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.12/lib/active_support/inflector/methods.rb:124:in `block in constantize': uninitialized constant ActionMailer (NameError)
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:416:in `block in eager_load!'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:414:in `eager_load!'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-10-28T20:54:22.594177+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.7/app/mailers/devise/mailer.rb:1:in `<top (required)>'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/config/environment.rb:7:in `<top (required)>'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/initializable.rb:54:in `each'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from config.ru:3:in `require'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/rack/builder.rb:51:in `initialize'
2013-10-28T20:54:22.594415+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.12/lib/rails/application.rb:96:in `initialize!'    
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/rack/builder.rb:51:in `instance_eval'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from config.ru:1:in `new'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from config.ru:1:in `<main>'
2013-10-28T20:54:22.594649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1

/lib/thin/controllers/controller.rb:71:in `start'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-10-28T20:54:22.595084+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-10-28T20:54:24.444797+00:00 heroku[web.1]: Process exited with status 1
2013-10-28T20:54:24.462296+00:00 heroku[web.1]: State changed from starting to crashed
2013-10-28T20:54:26.402911+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:54:29.217590+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:54:29.959011+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:55:04.161060+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:55:05.013362+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=
2013-10-28T20:55:05.338644+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=trade-pl.herokuapp.com fwd="98.116.5.72" dyno= connect= service= status=503 bytes=

Other issues I ran into:

  • bootstrap
  • asset precompiling

I addressed these by turning off precompile.

Was it helpful?

Solution

Please see my answer here.

In short: are you absolutely sure it works locally? Are you running it in exactly the same way it would run remotely?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top