这是我第一次在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
"真正的"错误是这样的:
`require': no such file to load -- thin (LoadError)
您可以将以下行添加到 gemfile 中,以使其正常工作:
gem 'thin'
我认为您应该添加 2 个宝石,如下所示:
gem "heroku"
gem "thin"
然后运行命令行:捆绑安装
有关更多详细信息,请查看:http://wowcode.herokuapp.com