私は初心者です。私は、Michael Hartl による「Ruby on Rails 3 チュートリアル: 例によって Rails を学ぶ」に従っています。電子ブックの第 7 章の 4503 にいます。
Rails アプリを heroku にプッシュしてから、対応する Web ページを表示しようとしています。Heroku Web ページにアクセスすると、「申し訳ありませんが、問題が発生しました」というエラー メッセージが表示されます。
chad@chad-HP-Pavilion-dv6500-Notebook-PC:~/rails/sample_app$ git push heroku master
Counting objects: 423, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (300/300), done.
Writing objects: 100% (423/423), 171.76 KiB, done.
Total 423 (delta 193), reused 239 (delta 91)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.2
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.2)
Installing i18n (0.6.1)
Installing multi_json (1.4.0)
Installing activesupport (3.2.8)
Installing builder (3.0.4)
Installing activemodel (3.2.8)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.3)
Installing actionpack (3.2.8)
Installing mime-types (1.19)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.8)
Installing arel (3.0.2)
Installing tzinfo (0.3.35)
Installing activerecord (3.2.8)
Installing activeresource (3.2.8)
Installing coffee-script-source (1.4.0)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.2)
Installing json (1.7.5)
Installing rdoc (3.12)
Installing thor (0.16.0)
Installing railties (3.2.8)
Installing coffee-rails (3.2.2)
Installing gravatar_image_tag (0.1.0)
Installing jquery-rails (2.1.4)
Installing pg (0.14.1)
Using bundler (1.3.0.pre.2)
Installing rails (3.2.8)
Installing sass (3.2.3)
Installing sass-rails (3.2.5)
Installing uglifier (1.3.0)
Your bundle is complete! It was installed into ./vendor/bundle
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Detected manifest.yml, assuming assets were compiled locally
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size: 8.9MB
-----> Launching... done, v6
http://fast-caverns-8821.herokuapp.com deployed to Heroku
To git@heroku.com:fast-caverns-8821.git
* [new branch] master -> master
chad@chad-HP-Pavilion-dv6500-Notebook-PC:~/rails/sample_app$
$heroku ログ
chad@chad-HP-Pavilion-dv6500-Notebook-PC:~/rails/sample_app$ heroku logs
2013-01-03T21:48:06+00:00 heroku[api]: Release v2 created by chadfaling@gmail.com
2013-01-03T21:48:06+00:00 heroku[api]: Enable Logplex by chadfaling@gmail.com
2013-01-03T21:48:35+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:48:36+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:48:36+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:49:17+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:49:19+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:49:20+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:49:21+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:49:23+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:50:44+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:50:45+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:50:45+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:54:27+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=109.150.198.176 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T21:54:28+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=fast-caverns-8821.herokuapp.com fwd=109.150.198.176 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T22:11:25+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno= queue= wait= connect= service= status=502 bytes=
2013-01-03T22:17:11+00:00 heroku[slugc]: Slug compilation started
2013-01-03T22:17:44+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_IVORY resource by chadfaling@gmail.com
2013-01-03T22:17:44+00:00 heroku[api]: Release v3 created by chadfaling@gmail.com
2013-01-03T22:17:44+00:00 heroku[api]: Add DATABASE_URL config by chadfaling@gmail.com
2013-01-03T22:17:44+00:00 heroku[api]: Release v4 created by chadfaling@gmail.com
2013-01-03T22:17:49+00:00 heroku[api]: Add config by chadfaling@gmail.com
2013-01-03T22:17:49+00:00 heroku[api]: Release v5 created by chadfaling@gmail.com
2013-01-03T22:17:50+00:00 heroku[api]: Scale to web=1 by chadfaling@gmail.com
2013-01-03T22:17:50+00:00 heroku[api]: Release v6 created by chadfaling@gmail.com
2013-01-03T22:17:50+00:00 heroku[api]: Deploy 4c02e8a by chadfaling@gmail.com
2013-01-03T22:17:51+00:00 heroku[slugc]: Slug compilation finished
2013-01-03T22:17:53+00:00 heroku[web.1]: Starting process with command `bundle exec rails server-p 18935`
2013-01-03T22:17:54+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 53518`
2013-01-03T22:17:57+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-01-03T22:17:57+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-01-03T22:17:59+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-01-03T22:17:59+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-01-03T22:17:59+00:00 app[web.1]: => Booting WEBrick 2013-01-03T22:17:59+00:00 app[web.1]: => Call with -d to detach
2013-01-03T22:17:59+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-01-03T22:17:59+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-01-03T22:17:59+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:53518 2013-01-03T22:18:00+00:00 app[web.1]: [2013-01-03 22:18:00] INFO ruby1.9.2 (2011-07-09) [x86_64-linux]
2013-01-03T22:18:00+00:00 app[web.1]: [2013-01-03 22:18:00] INFO WEBrick 1.3.1
2013-01-03T22:18:00+00:00 app[web.1]: [2013-01-03 22:18:00] INFO WEBrick::HTTPServer#start: pid=2 port=53518
2013-01-03T22:18:02+00:00 app[web.1]: Connecting to database specified by DATABASE_URL 2013-01-03T22:18:02+00:00 app[web.1]: => Booting WEBrick
2013-01-03T22:18:02+00:00 app[web.1]: => Call with -d to detach
2013-01-03T22:18:02+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:18935
2013-01-03T22:18:02+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-01-03T22:18:03+00:00 app[web.1]: [2013-01-03 22:18:03] INFO WEBrick 1.3.1
2013-01-03T22:18:03+00:00 app[web.1]: [2013-01-03 22:18:03] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
2013-01-03T22:18:03+00:00 app[web.1]: [2013-01-03 22:18:03] INFO WEBrick::HTTPServer#start: pid=2 port=18935
2013-01-03T22:18:03+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-01-03T22:18:03+00:00 heroku[web.1]: State changed from starting to up
2013-01-03T22:18:04+00:00 app[web.1]: [2013-01-03 22:18:04] ERROR SignalException: SIGTERM
2013-01-03T22:18:04+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2013-01-03T22:18:14+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-01-03T22:18:14+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-01-03T22:18:16+00:00 heroku[web.1]: Process exited with status 137
2013-01-03T22:18:18+00:00 app[web.1]: Started GET "/" for 71.203.9.123 at
2013-01-03 22:18:18 +0000 2013-01-03T22:18:18+00:00 app[web.1]:
2013-01-03T22:18:18+00:00 app[web.1]: 2013-01-03T22:18:18+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-01-03T22:18:18+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (7.6ms)
2013-01-03T22:18:18+00:00 heroku[router]: at=info method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno=web.1 queue=0 wait=2ms connect=3ms service=227ms status=500 bytes=643
2013-01-03T22:18:18+00:00 app[web.1]: Completed 500 Internal Server Error in 73ms
2013-01-03T22:18:18+00:00 app[web.1]: Rendered layouts/_stylesheets.html.erb (13.6ms)
2013-01-03T22:18:18+00:00 app[web.1]: 2013-01-03T22:18:18+00:00 app[web.1]: ActionView::Template::Error (blueprint/screen.css isn't precompiled):
2013-01-03T22:18:18+00:00 app[web.1]: 2: <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
2013-01-03T22:18:18+00:00 app[web.1]: 1: <!--[if it IE 9]>
2013-01-03T22:18:18+00:00 app[web.1]: 6: <!--[if it IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
2013-01-03T22:18:18+00:00 app[web.1]: 2013-01-03T22:18:18+00:00 app[web.1]: app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___3224471283117236114_42422900'
2013-01-03T22:18:18+00:00 app[web.1]: 2013-01-03T22:18:18+00:00 app[web.1]: 7: <%= stylesheet_link_tag 'custom', :media => 'screen' %>
2013-01-03T22:18:18+00:00 app[web.1]: app/views/layouts/_stylesheets.html.erb:4:in `_app_views_layouts__stylesheets_html_erb__1641714469046479695_41334620'
2013-01-03T22:18:18+00:00 app[web.1]: 3: <![endif]-->
2013-01-03T22:18:18+00:00 app[web.1]: 4: <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
2013-01-03T22:18:18+00:00 app[web.1]: 5: <%= stylesheet_link_tag 'blueprint/print', :media=> 'print' %>
2013-01-03T22:27:21+00:00 app[web.1]: 2013-01-03T22:27:21+00:00 app[web.1]: Started GET "/" for 71.203.9.123 at
2013-01-03 22:27:21 +0000 2013-01-03T22:27:21+00:00 app[web.1]:
2013-01-03T22:27:21+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-01-03T22:27:21+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (0.3ms)
2013-01-03T22:27:21+00:00 app[web.1]: Rendered layouts/_stylesheets.html.erb (0.7ms)
2013-01-03T22:27:21+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2013-01-03T22:27:21+00:00 app[web.1]: 5: <%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
2013-01-03T22:27:21+00:00 app[web.1]:
2013-01-03T22:27:21+00:00 app[web.1]: 7: <%= stylesheet_link_tag 'custom', :media => 'screen' %>
2013-01-03T22:27:21+00:00 app[web.1]: 2: <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
2013-01-03T22:27:21+00:00 app[web.1]: 1: <!--[if it IE 9]>
2013-01-03T22:27:21+00:00 app[web.1]: ActionView::Template::Error (blueprint/screen.css isn't precompiled):
2013-01-03T22:27:21+00:00 app[web.1]: 3: <![endif]-->
2013-01-03T22:27:21+00:00 app[web.1]: 4: <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
2013-01-03T22:27:21+00:00 app[web.1]: app/views/layouts/_stylesheets.html.erb:4:in `_app_views_layouts__stylesheets_html_erb__1641714469046479695_41334620'
2013-01-03T22:27:21+00:00 app[web.1]: app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___3224471283117236114_42422900'
2013-01-03T22:27:21+00:00 app[web.1]: 6: <!--[if it IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
2013-01-03T22:27:21+00:00 app[web.1]: 2013-01-03T22:27:21+00:00 app[web.1]:
2013-01-03T22:27:21+00:00 heroku[router]: at=info method=GET path=/ host=fast-caverns-8821.herokuapp.com fwd=71.203.9.123 dyno=web.1 queue=0 wait=0ms connect=2ms service=23ms status=500 bytes=643
誰でも助けることができますか?お願いします :)
注: 同様の問題に関する他の投稿を読み、以下の提案を試みました。
- config/environments/production.rb で、設定します
config.assets.precompile += %w( blueprint/screen.css blueprint/print.css )