将“Hello World”部署到Heroku时出现应用程序错误

时间:2015-09-03 21:09:27

标签: ruby-on-rails heroku railstutorial.org

我正在使用Cloud 9跟踪Rails教程(第3版)。

管理制作'Hello,world!'应用程序在本地运行正常(在Cloud 9中) - 但是当我尝试部署到Heroku时,我收到应用程序错误。

当我运行'heroku logs'时,我收到以下回复:

trendyy@rails-tutorial:~/workspace/toy_app (master) $ heroku logs
2015-09-03T20:42:02.630118+00:00 heroku[api]: Enable Logplex by jamestrendell@gmail.com
2015-09-03T20:42:02.630239+00:00 heroku[api]: Release v2 created by jamestrendell@gmail.com
2015-09-03T20:44:13.046522+00:00 heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE, RAILS_SERVE_STATIC_FILES config vars by jamestrendell@gmail.com
2015-09-03T20:44:13.046692+00:00 heroku[api]: Release v3 created by jamestrendell@gmail.com
2015-09-03T20:44:13.503949+00:00 heroku[api]: Attach DATABASE resource by jamestrendell@gmail.com
2015-09-03T20:44:13.504075+00:00 heroku[api]: Release v4 created by jamestrendell@gmail.com
2015-09-03T20:44:13.825487+00:00 heroku[api]: Scale to web=1 by jamestrendell@gmail.com
2015-09-03T20:44:13.941859+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-03T20:44:13.941882+00:00 heroku[slug-compiler]: Slug compilation finished
2015-09-03T20:44:13.878704+00:00 heroku[api]: Deploy 78d16c9 by jamestrendell@gmail.com
2015-09-03T20:44:13.878995+00:00 heroku[api]: Release v5 created by jamestrendell@gmail.com
2015-09-03T20:44:17.243563+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40476 -e production`
2015-09-03T20:44:19.677037+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-09-03T20:44:19.677062+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-09-03T20:44:19.677065+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-09-03T20:44:19.677069+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-09-03T20:44:19.677067+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-09-03T20:44:19.677070+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-09-03T20:44:19.677072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-09-03T20:44:19.677073+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-09-03T20:44:19.677075+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-09-03T20:44:19.677081+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-09-03T20:44:19.677082+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-09-03T20:44:19.677083+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-09-03T20:44:19.677084+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-09-03T20:44:19.677085+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-09-03T20:44:19.677087+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-09-03T20:44:19.677088+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-09-03T20:44:19.677089+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-09-03T20:44:19.677091+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-09-03T20:44:19.677090+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-09-03T20:44:19.677094+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2015-09-03T20:44:19.677093+00:00 app[web.1]:    from bin/rails:8:in `require'
2015-09-03T20:44:20.473059+00:00 heroku[web.1]: Process exited with status 1
2015-09-03T20:44:20.487578+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-03T20:44:20.487578+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-03T20:44:24.617578+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 32247 -e production`
2015-09-03T20:44:27.387267+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-09-03T20:44:27.387291+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-09-03T20:44:27.387292+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-09-03T20:44:27.387294+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-09-03T20:44:27.387295+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-09-03T20:44:27.387296+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-09-03T20:44:27.387297+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-09-03T20:44:27.387299+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-09-03T20:44:27.387300+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-09-03T20:44:27.387304+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-09-03T20:44:27.387305+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-09-03T20:44:27.387306+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-09-03T20:44:27.387307+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-09-03T20:44:27.387308+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-09-03T20:44:27.387310+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-09-03T20:44:27.387311+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-09-03T20:44:27.387312+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-09-03T20:44:27.387313+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-09-03T20:44:27.387314+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-09-03T20:44:27.387316+00:00 app[web.1]:    from bin/rails:8:in `require'
2015-09-03T20:44:27.387317+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2015-09-03T20:44:28.319291+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-03T20:44:28.305632+00:00 heroku[web.1]: Process exited with status 1
2015-09-03T20:44:48.896562+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=morning-falls-9154.herokuapp.com request_id=f1c8f427-f027-489b-9bf7-af0a2a8ce82e fwd="90.254.46.23" dyno= connect= service= status=503 bytes=
2015-09-03T20:44:49.802737+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=morning-falls-9154.herokuapp.com request_id=5fcf3c4a-9445-4567-8863-03a975e8901d fwd="90.254.46.23" dyno= connect= service= status=503 bytes=
2015-09-03T20:47:31.039394+00:00 heroku[api]: Deploy 42d92a2 by jamestrendell@gmail.com
2015-09-03T20:47:31.039532+00:00 heroku[api]: Release v6 created by jamestrendell@gmail.com
2015-09-03T20:47:31.117704+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-03T20:47:31.117724+00:00 heroku[slug-compiler]: Slug compilation finished
2015-09-03T20:47:31.127082+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-03T20:47:34.429565+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 59663 -e production`
2015-09-03T20:47:37.578770+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
2015-09-03T20:47:37.578785+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
2015-09-03T20:47:37.578787+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
2015-09-03T20:47:37.578788+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
2015-09-03T20:47:37.578789+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
2015-09-03T20:47:37.578790+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-09-03T20:47:37.578795+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-09-03T20:47:37.578792+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-09-03T20:47:37.578797+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-09-03T20:47:37.578798+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-09-03T20:47:37.578799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-09-03T20:47:37.578800+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-09-03T20:47:37.578801+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-09-03T20:47:37.578802+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-09-03T20:47:37.578804+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-09-03T20:47:37.578805+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-09-03T20:47:37.578806+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-09-03T20:47:37.578807+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-09-03T20:47:37.578808+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2015-09-03T20:47:37.578810+00:00 app[web.1]:    from bin/rails:8:in `require'
2015-09-03T20:47:37.578812+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2015-09-03T20:47:38.458711+00:00 heroku[web.1]: Process exited with status 1
2015-09-03T20:47:38.472292+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-03T20:47:57.989827+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=morning-falls-9154.herokuapp.com request_id=2235eac5-2a9c-4e46-924d-23366c7baa60 fwd="90.254.46.23" dyno= connect= service= status=503 bytes=
2015-09-03T20:47:58.852545+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=morning-falls-9154.herokuapp.com request_id=f432a00c-167e-4a77-91d8-7bb1d6545e80 fwd="90.254.46.23" dyno= connect= service= status=503 bytes=

我是一个完全的初学者,非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

尝试将您的sass-rails版本升级到5.0.2或更高版本。将其添加到您的Gemfile

gem 'sass-rails', '5.0.3'

检查此线程here,解决了同样的问题。