我正在关注Ruby on Rails Web开发的Michael Hartls教程,并在第7章结束时报告了注册(http://ruby.railstutorial.org/chapters/sign-up#sec-tests_for_user_signup)。
在我的localhost上启动应用程序工作正常,并将其启动到Heroku,直到本章,但现在我得到了H10错误。
我查看了heroku日志,但似乎没有任何语法或未安装的gemfiles。我还在heroku上打开网站之前运行了heroku run rake db:migrate。但是我仍然得到同样的错误。
如果可以的话,非常感谢任何帮助。 谢谢你的时间。
2013-06-29T09:04:54.821851+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-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-29T09:04:55.047372+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-06-29T09:04:55.047831+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-06-29T09:04:55.047983+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-06-29T09:04:55.046955+00:00 app[web.1]: See everything in the log (default is :info)
2013-06-29T09:04:55.046955+00:00 app[web.1]: ^
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-06-29T09:04:55.047831+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-06-29T09:04:55.047212+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-06-29T09:04:55.047831+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-06-29T09:04:55.047212+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-06-29T09:04:55.047212+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-06-29T09:04:55.047212+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-06-29T09:04:55.047831+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-06-29T09:04:55.046955+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': /app/config/environments/production.rb:33: syntax error, unexpected keyword_in, expecting keyword_end (SyntaxError)
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:571:in `block in <class:Engine>'
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-06-29T09:04:55.046955+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/config.ru:in `new'
2013-06-29T09:04:55.047831+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-06-29T09:04:55.068195+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-06-29T09:04:55.047831+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-06-29T09:04:55.068195+00:00 app[web.1]: => Call with -d to detach
2013-06-29T09:04:55.047831+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-06-29T09:04:55.047831+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-06-29T09:04:55.047983+00:00 app[web.1]: from script/rails:6:in `require'
2013-06-29T09:04:55.047831+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-06-29T09:04:55.047212+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-06-29T09:04:55.047831+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-06-29T09:04:55.068195+00:00 app[web.1]: => Booting WEBrick
2013-06-29T09:04:55.068195+00:00 app[web.1]: Exiting
2013-06-29T09:04:55.068195+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:37944
2013-06-29T09:04:56.568729+00:00 heroku[web.1]: Process exited with status 1
2013-06-29T09:04:56.582829+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-29T09:04:43+00:00 heroku[slug-compiler]: Slug compilation finished
2013-06-29T09:04:57.782340+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:04:57.994965+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:10:58.047688+00:00 heroku[web.1]: State changed from crashed to starting
2013-06-29T09:11:06.335632+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 24215`
2013-06-29T09:11:17.398786+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-06-29T09:11:17.398207+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-06-29T09:11:17.398518+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-06-29T09:11:19.607748+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-29T09:11:18.240845+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-06-29T09:11:18.241446+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-06-29T09:11:18.240707+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': /app/config/environments/production.rb:33: syntax error, unexpected keyword_in, expecting keyword_end (SyntaxError)
2013-06-29T09:11:18.240707+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-06-29T09:11:18.240845+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-06-29T09:11:18.241143+00:00 app[web.1]: from /app/config.ru:in `new'
2013-06-29T09:11:18.241143+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-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-06-29T09:11:18.252865+00:00 app[web.1]: => Booting WEBrick
2013-06-29T09:11:18.241446+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-06-29T09:11:18.241143+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-06-29T09:11:18.241446+00:00 app[web.1]: from script/rails:6:in `require'
2013-06-29T09:11:18.241143+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-06-29T09:11:18.241446+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-06-29T09:11:18.252865+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:24215
201
3-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-06-29T09:11:18.240707+00:00 app[web.1]: See everything in the log (default is :info)
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-06-29T09:11:18.240845+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:571:in `block in <class:Engine>'
2013-06-29T09:11:18.241143+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-06-29T09:11:18.241143+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-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-06-29T09:11:18.241446+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-06-29T09:11:18.241446+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-06-29T09:11:18.241143+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-06-29T09:11:18.241143+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-06-29T09:11:18.252865+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-06-29T09:11:18.252865+00:00 app[web.1]: Exiting
2013-06-29T09:11:18.240707+00:00 app[web.1]: ^
2013-06-29T09:11:18.241002+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-06-29T09:11:18.241143+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-06-29T09:11:18.241446+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-06-29T09:11:18.252865+00:00 app[web.1]: => Call with -d to detach
2013-06-29T09:11:19.595243+00:00 heroku[web.1]: Process exited with status 1
2013-06-29T09:11:48.220707+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by markmurray406@gmail.com
2013-06-29T09:11:52.813935+00:00 heroku[run.9768]: Awaiting client
2013-06-29T09:11:52.839976+00:00 heroku[run.9768]: Starting process with command `bundle exec rake db:migrate`
2013-06-29T09:11:54.059389+00:00 heroku[run.9768]: State changed from starting to up
2013-06-29T09:11:58.081983+00:00 heroku[run.9768]: Process exited with status 1
2013-06-29T09:11:58.103006+00:00 heroku[run.9768]: State changed from up to complete
2013-06-29T09:12:38.785250+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:12:41.235151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:12:41.413239+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:12:38.922579+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:12:50.528089+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
2013-06-29T09:12:50.689987+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=pacific-dawn-2489.herokuapp.com fwd="109.78.252.61" dyno= connect= service= status=503 bytes=
答案 0 :(得分:3)
阅读你的日志(这是一门艺术品来阅读' - 你会改进),从上面可以看出你有这个错误:
/app/config/environments/production.rb:33: syntax error, unexpected keyword_in, expecting keyword_end (SyntaxError)
查看你的app/config/environments/production.rb
- 我打赌你会在那里找到你的错误。
它可能永远不会在本地出现,因为你没有在生产模式下运行。