在heroku崩溃的Rails部署

时间:2012-10-12 01:49:22

标签: ruby-on-rails ruby-on-rails-3 deployment heroku

这是我第一次尝试使用rails部署,我无法解决这个问题。出于某种原因,我无法让我的应用程序运行。这是我在运行heroku日志时得到的结果:

2012-10-12T01:44:29+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 54445`
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `<top (required)>'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `inject'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `get'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `each'
2012-10-12T01:44:34+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': no such file to load -- thin (LoadError)
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:269:in `server'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:59:in `start'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `const_get'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `block in get'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-10-12T01:44:34+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-10-12T01:44:34+00:00 app[web.1]:   from script/rails:6:in `require'
2012-10-12T01:44:34+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-10-12T01:44:34+00:00 app[web.1]: Exiting
2012-10-12T01:44:35+00:00 heroku[web.1]: Process exited with status 1
2012-10-12T01:44:35+00:00 heroku[web.1]: State changed from starting to crashed

2 个答案:

答案 0 :(得分:2)

“真实”错误是这样的:

`require': no such file to load -- thin (LoadError)

您可以将以下行添加到您的gem文件中,以使其正常工作:

 gem 'thin'

答案 1 :(得分:0)

我认为你应该添加2个gem,如下所示:

gem "heroku"
gem "thin"

然后运行命令行:bundle install

有关详细信息,请查看:http://wowcode.herokuapp.com