2015-12-10 171 views
1

我試圖將我的Rails應用程序部署到Heroku。到目前爲止,我所做的所有工作都是創建rails應用程序,安裝捆綁包並將其提交給bitbucket。下一步是部署到Heroku並打印Hello World以確認其工作。我得到這個錯誤:Rails/Heroku應用程序錯誤

Application Error 
An error occurred in the application and your page could not be served. Please try again in a few moments. 

If you are the application owner, check your logs for details. 

我試圖尋找一個類似的錯誤,但我找不到任何具體到我的問題。這裏是英雄日誌:

heroku[api]: Enable Logplex by [email protected] 
heroku[api]: Release v2 created by [email protected] 
heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE, RAILS_SERVE_STATIC_FILES config vars by [email protected] 
heroku[api]: Release v3 created by [email protected] 
heroku[api]: Attach DATABASE resource by [email protected] 
heroku[api]: Release v4 created by [email protected] 
heroku[api]: Scale to web=1 by [email protected] 
heroku[api]: Deploy 221c876 by [email protected] 
heroku[api]: Release v5 created by [email protected] 
heroku[slug-compiler]: Slug compilation started 
heroku[slug-compiler]: Slug compilation finished 
heroku[web.1]: Starting process with command `bin/rails server -p 16863 -e production` 
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError) 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require' 
app[web.1]: from /app/config/application.rb:7:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>' 
app[web.1]: from bin/rails:9:in `require' 
app[web.1]: from bin/rails:9:in `<main>' 
heroku[web.1]: Process exited with status 1 
heroku[web.1]: State changed from starting to crashed 
heroku[web.1]: State changed from crashed to starting 
heroku[web.1]: Starting process with command `bin/rails server -p 14724 -e production` 
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError) 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require' 
app[web.1]: from /app/config/application.rb:7:in `<top (required)>' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>' 
app[web.1]: from bin/rails:9:in `require' 
app[web.1]: from bin/rails:9:in `<main>' 
heroku[web.1]: Process exited with status 1 
heroku[web.1]: State changed from starting to crashed 
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=polar-mountain-3183.herokuapp.com request_id=4dbb54f0-d4f6-478a-8ef0-899d8030e160 fwd="174.113.76.61" dyno= connect= service= status=503 bytes= 
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=polar-mountain-3183.herokuapp.com request_id=426832e0-0555-4d98-91d1-1ffdede05f6f fwd="174.113.76.61" dyno= connect= service= status=503 bytes= 

我刪除了日誌的日期和時間,所以它更容易閱讀,行不那麼寬。我也明顯的原因刪除了我的電子郵件/帳戶。

回答

1

通過查看日誌,似乎有什麼fog gem導致啓動rails服務器的問題。

正如你所說,你只是想測試「你好世界」,我會建議暫時請從Gemfile remove fog gem並重新部署在heroku上。

如果一切正常,那麼以後你總是可以調試霧問題。

+0

是的,這正是問題所在。我昨天晚上想到了它,但太累了,無法刪除這篇文章。 – thermobeelearns

1

這裏的錯誤:

'require': cannot load such file -- net/ssh (LoadError)

看起來你一直在努力,包括某種ssh功能集成到你的應用程序?

具體來說,它看起來像它來自fog寶石。

根據以下question,你應該能夠要麼fognet-ssh寶石添加到您的應用程序得到它的工作:

#Gemfile 
gem 'fog', '~> 1.36.0' 
gem 'net-ssh' 

添加那些在本地,然後推到Heroku的。

在黑暗中刺傷;如果它不起作用,我會很樂意刪除這個答案。

+0

你是對的。問題是霧的寶石。 – thermobeelearns