0

我正在尝试使用 Heroku 来部署我的第一个应用程序。我仔细按照说明进行操作,但是当我浏览到提供的链接时收到错误消息http://boiling-bastion-xxxx.herokuapp.com/。在我的本地服务器上一切正常。下面是heroku日志。是什么导致应用程序错误?

C:\Users\Me\Desktop\sample_app>heroku logs
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<t
op (required)>'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'

2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/config.ru:3:in `block in <main
>'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/config.ru:in `new'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/config.ru:in `<main>'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:50:in `tap'
2013-03-07T02:20:25+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
2013-03-07T02:20:25+00:00 app[web.1]:   from script/rails:6:in `require'
2013-03-07T02:20:25+00:00 app[web.1]:   from script/rails:6:in `<main>'
2013-03-07T02:20:26+00:00 heroku[web.1]: Process exited with status 1
2013-03-07T02:20:26+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-07T02:20:26+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-07T02:20:28+00:00 heroku[web.1]: Starting process with command `bundle e
xec rails server -p 25011`
2013-03-07T02:20:36+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or 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-03-07T02:20:36+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or 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-03-07T02:20:36+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or 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-03-07T02:20:38+00:00 app[web.1]:         SECURITY WARNING: No secret option
 provided to Rack::Session::Cookie.
2013-03-07T02:20:38+00:00 app[web.1]:         This poses a security threat. It i
s strongly recommended that you
2013-03-07T02:20:38+00:00 app[web.1]:         provide a secret to prevent exploi
ts that may be possible from crafted
2013-03-07T02:20:38+00:00 app[web.1]:         cookies. This will not be supporte
d in future versions of Rack, and
2013-03-07T02:20:38+00:00 app[web.1]:         future versions will even invalida
te your existing user cookies.
2013-03-07T02:20:38+00:00 app[web.1]:
2013-03-07T02:20:38+00:00 app[web.1]:         Called from: /app/vendor/bundle/ru
by/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/session/abstract_s
tore.rb:28:in `initialize'.
2013-03-07T02:20:38+00:00 app[web.1]:
2013-03-07T02:20:41+00:00 app[web.1]: => Booting WEBrick
2013-03-07T02:20:41+00:00 app[web.1]: => Rails 3.2.3 application starting in pro
duction on http://0.0.0.0:25011
2013-03-07T02:20:41+00:00 app[web.1]: => Call with -d to detach
2013-03-07T02:20:41+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-03-07T02:20:41+00:00 app[web.1]: Exiting
2013-03-07T02:20:41+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actives
upport-3.2.3/lib/active_support/dependencies.rb:251:in `require': /app/app/contr
ollers/widgets_controller.rb:9: syntax error, unexpected keyword_end, expecting
$end (SyntaxError)
2013-03-07T02:20:41+00:00 app[web.1]:       ^
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb
:236:in `load_dependency'
2013-03-07T02:20:41+00:00 app[web.1]:    end
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'

2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:313:in `depend_on'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:225:in `require_dependenc
y'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/engine.rb:438:in `each'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/engine.rb:438:in `block in eager_load!'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/engine.rb:436:in `each'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/engine.rb:436:in `eager_load!'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/application/finisher.rb:53:in `block in <module:Finishe
r>'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/initializable.rb:30:in `run'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/initializable.rb:54:in `each'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<t
op (required)>'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'

2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/config.ru:3:in `block in <main
>'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/config.ru:in `new'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/config.ru:in `<main>'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:50:in `tap'
2013-03-07T02:20:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/
railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
2013-03-07T02:20:41+00:00 app[web.1]:   from script/rails:6:in `require'
2013-03-07T02:20:41+00:00 app[web.1]:   from script/rails:6:in `<main>'
2013-03-07T02:20:42+00:00 heroku[web.1]: Process exited with status 1
2013-03-07T02:20:42+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-07T02:22:01+00:00 heroku[api]: Starting process with command `bundle exe
c rake db:migrate` by skim@outlook.com
2013-03-07T02:22:04+00:00 heroku[run.1268]: Starting process with command `bundl
e exec rake db:migrate`
2013-03-07T02:22:04+00:00 heroku[run.1268]: Awaiting client
2013-03-07T02:22:04+00:00 heroku[run.1268]: State changed from starting to up
2013-03-07T02:22:19+00:00 heroku[run.1268]: Process exited with status 0
2013-03-07T02:22:19+00:00 heroku[run.1268]: State changed from up to complete
2013-03-07T02:22:22+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/ host=boiling-bastion-2459.herokuapp.com fwd="75.82.42.93" dyno=
 queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:22+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/favicon.ico host=boiling-bastion-2459.herokuapp.com fwd="75.82.4
2.93" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:22+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/favicon.ico host=boiling-bastion-2459.herokuapp.com fwd="75.82.4
2.93" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:26+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/ host=boiling-bastion-2459.herokuapp.com fwd="75.82.42.93" dyno=
 queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:27+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/ host=boiling-bastion-2459.herokuapp.com fwd="75.82.42.93" dyno=
 queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:30+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/ host=boiling-bastion-2459.herokuapp.com fwd="75.82.42.93" dyno=
 queue= wait= connect= service= status=503 bytes=
2013-03-07T02:22:46+00:00 heroku[router]: at=error code=H10 desc="App crashed" m
ethod=GET path=/ host=boiling-bastion-2459.herokuapp.com fwd="75.82.42.93" dyno=
 queue= wait= connect= service= status=503 bytes=

C:\Users\Me\Desktop\sample_app>
4

1 回答 1

0

它在你的/widgets_controller.rb

它说

syntax error, unexpected keyword_end, expecting $end (SyntaxError)

我假设你不小心遗漏了一个end

于 2013-03-07T02:32:09.417 回答