如果有人能指出我正确的方向来帮助在 Heroku 上启动我的 rails 应用程序,我们将不胜感激。
我的应用程序在本地工作并使用以下内容:
- 导轨 1.9.3
- mongodb
- 蒙古族
- 薄的
- 引导程序
Heroku 日志表明该应用找不到 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=
我在 application.rb 中注释掉了所有必需的 railties 文件(不仅仅是 action_mailer;它们都没有工作),但现在我得到了另一个错误。我认为还有另一个问题,而不是我想念的问题。
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=
我遇到的其他问题:
- 引导程序
- 资产预编译
我通过关闭预编译来解决这些问题。