2013-10-29 68 views
0

如果任何人都可以點我正確的方向來幫助在Heroku上啓動我的Rails應用程序,我們將非常感謝您的幫助。讓Heroku與Rails Monogdb Thin一起工作

我的應用程序在本地工作和使用下列內容:

  • 軌1.9.3
  • 的mongodb
  • mongoid
  • 引導

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= 

其他問題我跑進:

  • 引導
  • 資產預編譯

我解決了這些通過關閉預編譯。

回答

0

請參閱my answer here

總之:你絕對確定它在本地有效嗎?你是否以與遠程運行方式完全相同的方式運行它?

+0

感謝您的回答。在我的gemfile中,我指定了「ruby'1.9.3'」,當我在本地運行「bundle exec thin start」時,應用程序可以正常工作。但我在本地檢查了Heroku v上的寶石列表,他們不匹配,所以我會調查它。特別是,本地是actionmailer(3.1.3),而在Heroku上是actionmailer(0.6.1)。 – Scott

+0

再次感謝。這是我需要的工作才能實現的。我不知道爲什麼,但heroku上的寶石沒有下載最新版本。該應用程序現在工作。乾杯。 – Scott

+0

很高興它的工作。奇怪的是。我唯一的猜測是你可能沒有提交併推送最新的Gemfile.lock? –