0

应用程序发生错误,无法提供您的页面。请稍后重试。

如果您是应用程序所有者,请查看您的日志以获取详细信息。

在此处输入图像描述

这是输出$ heroku logs

2013-11-04T16:42:03.262057+00:00 app[web.1]: => Booting WEBrick
2013-11-04T16:42:03.262057+00:00 app[web.1]: => Call with -d to detach
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-11-04T16:42:03.262057+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-11-04T16:42:03.262812+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:11: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-11-04T16:42:03.262057+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:21573
2013-11-04T16:42:03.262057+00:00 app[web.1]: Exiting
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/config.ru:3:in `require'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from script/rails:6:in `require'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-11-04T16:42:03.262812+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-11-04T16:42:03.262959+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-11-04T16:42:03.263102+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-11-04T16:42:03.263481+00:00 app[web.1]:    from s
cript/rails:6:in `<main>'
2013-11-04T16:42:04.472335+00:00 heroku[web.1]: Process exited with status 1
2013-11-04T16:42:04.486507+00:00 heroku[web.1]: State changed from starting to crashed
2013-11-04T16:42:04.487147+00:00 heroku[web.1]: State changed from crashed to starting
2013-11-04T16:42:08.798959+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 25033`
2013-11-04T16:42:11.912925+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-11-04T16:42:11.912925+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-11-04T16:42:12.498245+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:25033
2013-11-04T16:42:12.498245+00:00 app[web.1]: Exiting
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-11-04T16:42:12.498245+00:00 app[web.1]: => Call with -d to detach
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-11-04T16:42:12.498245+00:00 app[web.1]: => Booting WEBrick
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-11-04T16:42:12.498245+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-11-04T16:42:12.499025+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:11: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from script/rails:6:in `require'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-11-04T16:42:12.499025+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-11-04T16:42:12.499167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/config.ru:3:in `require'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from script/rails:6:in `<main>'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-11-04T16:42:12.499842+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-11-04T16:42:12.499310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-11-04T16:42:13.751522+00:00 heroku[web.1]: State changed from starting to crashed
2013-11-04T16:42:13.731563+00:00 heroku[web.1]: Process exited with status 1
2013-11-04T16:42:15.692293+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=protected-fjord-9847.herokuapp.com fwd="122.171.4.161" dyno= connect= service= status=503 bytes=
2013-11-04T16:42:17.108274+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=protected-fjord-9847.herokuapp.com fwd="122.171.4.161" dyno= connect= service= status=503 bytes=
2013-11-04T16:43:56.642434+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=protected-fjord-9847.herokuapp.com fwd="117.203.200.191" dyno= connect= service= status=503 bytes=
2013-11-04T16:42:14.944153+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=protected-fjord-9847.herokuapp.com fwd="122.171.4.161" dyno= connect= service= status=503 bytes=
2013-11-04T16:43:55.498175+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=protected-fjord-9847.herokuapp.com fwd="117.203.200.191" dyno= connect= service= status=503 bytes=

pastebin 链接http://pastebin.com/h5vTk4c0

4

1 回答 1

0

我认为值得尝试unicorn在 heroku 而不是 webrick 上运行。由于某种原因,Heroku 在运行其他网络服务器方面变得很糟糕。去年我瘦得非常好,但是今年,当我有一些代码要更新并尝试上传到 heroku 时,Thin 打破了 heroku。

  1. 添加gem 'unicorn'
  2. bundle install
  3. 创造config/unicorn.rb
  4. 将以下内容添加到config/unicorn.rb
config/unicorn.rb
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 15
preload_app true

before_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
    Process.kill 'QUIT', Process.pid
  end

  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.connection.disconnect!
end 

after_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
  end

  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.establish_connection
end

最后提交更改并推送到heroku

于 2013-11-04T18:11:34.217 回答