2015-12-10 148 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