我被困在迈克尔·哈特尔的Ruby上Ralis(第3版)云9Ruby on Rails的教程的Heroku应用程序错误
我试图让Heroku的应用程序的工作,但我正在逐渐:
应用程序错误
在应用程序中发生错误,并且您的页面不能以 提供服务。请稍后重试。
如果您是应用程序所有者,请查看您的日志以了解详细信息。
由于Chloe的建议我已经改变了'青菜-Rails的版本和更新的 '青菜护栏'
的Gemfile现在:
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.3'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'pg', '0.17.1'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
由于thesecretmaster劝我从sqlite3的迁移到postgesql使用the instructions given by heroku
捆绑安装:
Your Gemfile lists the gem pg (= 0.17.1) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.2
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.7
Using loofah 2.0.3
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.0
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.6
Using activejob 4.2.0
Using mime-types 2.6.2
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemodel 4.2.0
Using arel 6.0.3
Using activerecord 4.2.0
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.3.pre1
Using columnize 0.9.0
Using debugger-linecache 1.2.0
Using slop 3.6.0
Using byebug 3.4.0
Using coffee-script-source 1.9.1.1
Using execjs 2.6.0
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.0
Using coffee-rails 4.1.0
Using multi_json 1.11.2
Using jbuilder 2.2.3
Using jquery-rails 4.0.3
Using pg 0.17.1
Using bundler 1.7.6
Using sprockets 3.4.0
Using sprockets-rails 2.3.3
Using rails 4.2.0
Using rdoc 4.2.0
Using sass 3.4.19
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.0
Using spring 1.1.3
Using turbolinks 2.3.0
Using uglifier 2.5.3
Using web-console 2.0.0.beta3
Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
现在Heroku的日志:
2015-11-07T04:01:15.515528+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-11-07T04:01:15.515529+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-11-07T04:01:15.515530+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-11-07T04:01:15.515531+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-11-07T04:01:15.515532+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-11-07T04:01:15.515537+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-11-07T04:01:15.515538+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-11-07T04:01:15.515539+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-11-07T04:01:15.515541+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-11-07T04:01:15.515539+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-11-07T04:01:15.515542+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-11-07T04:01:15.515540+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-11-07T04:01:15.515544+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-11-07T04:01:15.515542+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-11-07T04:01:15.515543+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-11-07T04:01:15.515545+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-11-07T04:01:15.515546+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-11-07T04:01:15.515546+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-11-07T04:01:15.515547+00:00 app[web.1]: from bin/rails:8:in `require'
2015-11-07T04:01:15.515548+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-11-07T04:01:16.156737+00:00 heroku[web.1]: Process exited with status 1
2015-11-07T04:01:16.180172+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-07T09:53:24.813502+00:00 heroku[web.1]: State changed from crashed to starting
2015-11-07T09:53:26.649609+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 3154 -e production`
2015-11-07T09:53:28.640879+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-11-07T09:53:28.640889+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-11-07T09:53:28.640890+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-11-07T09:53:28.640891+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-11-07T09:53:28.640892+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-11-07T09:53:28.640893+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-11-07T09:53:28.640894+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-11-07T09:53:28.640895+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-11-07T09:53:28.640898+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-11-07T09:53:28.640899+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-11-07T09:53:28.640899+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-11-07T09:53:28.640902+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-11-07T09:53:28.640900+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-11-07T09:53:28.640901+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-11-07T09:53:28.640901+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-11-07T09:53:28.640904+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-11-07T09:53:28.640903+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-11-07T09:53:28.640905+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-11-07T09:53:28.640904+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-11-07T09:53:28.640906+00:00 app[web.1]: from bin/rails:8:in `require'
2015-11-07T09:53:28.640908+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-11-07T09:53:29.330052+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-07T09:53:29.312397+00:00 heroku[web.1]: Process exited with status 1
2015-11-07T15:29:39.760673+00:00 heroku[web.1]: State changed from crashed to starting
2015-11-07T15:29:41.134773+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 36601 -e production`
2015-11-07T15:29:42.344984+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-11-07T15:29:42.344999+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-11-07T15:29:42.345000+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-11-07T15:29:42.345000+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-11-07T15:29:42.345001+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-11-07T15:29:42.345001+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-11-07T15:29:42.345002+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-11-07T15:29:42.345003+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-11-07T15:29:42.345003+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-11-07T15:29:42.345004+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-11-07T15:29:42.345005+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-11-07T15:29:42.345006+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-11-07T15:29:42.345006+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-11-07T15:29:42.345007+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-11-07T15:29:42.345007+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-11-07T15:29:42.345008+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-11-07T15:29:42.345008+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-11-07T15:29:42.345009+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-11-07T15:29:42.345009+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-11-07T15:29:42.345010+00:00 app[web.1]: from bin/rails:8:in `require'
2015-11-07T15:29:42.345010+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-11-07T15:29:42.853092+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-07T15:29:42.835606+00:00 heroku[web.1]: Process exited with status 1
2015-11-07T19:33:16.727397+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview0&_c9_host=https://ide.c9.io" host=shrouded-savannah-6091.herokuapp.com request_id=9c198516-5ab2-46fa-bda4-47ee664e0fe1 fwd="90.192.204.238" dyno= connect= service= status=503 bytes=
2015-11-07T21:29:52.097847+00:00 heroku[web.1]: State changed from crashed to starting
2015-11-07T21:29:53.687754+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 31558 -e production`
2015-11-07T21:29:55.589151+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-11-07T21:29:55.589184+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-11-07T21:29:55.589186+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-11-07T21:29:55.589186+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-11-07T21:29:55.589188+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-11-07T21:29:55.589187+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-11-07T21:29:55.589187+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-11-07T21:29:55.589189+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-11-07T21:29:55.589188+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-11-07T21:29:55.589190+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-11-07T21:29:55.589191+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-11-07T21:29:55.589189+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-11-07T21:29:55.589190+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-11-07T21:29:55.589192+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-11-07T21:29:55.589192+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-11-07T21:29:55.589193+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-11-07T21:29:55.589193+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-11-07T21:29:55.589197+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-11-07T21:29:55.589193+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-11-07T21:29:55.589194+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-11-07T21:29:55.589194+00:00 app[web.1]: from bin/rails:8:in `require'
2015-11-07T21:29:56.163038+00:00 heroku[web.1]: State changed from starting to crashed
2015-11-07T21:29:56.172834+00:00 heroku[web.1]: Process exited with status 1
2015-11-07T22:21:03.270746+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview0&_c9_host=https://ide.c9.io" host=shrouded-savannah-6091.herokuapp.com request_id=511497b3-bb4b-44e6-b57d-b07c88d59eff fwd="90.192.204.238" dyno= connect= service= status=503 bytes=
2015-11-07T22:43:47.751918+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview1&_c9_host=https://ide.c9.io" host=shrouded-savannah-6091.herokuapp.com request_id=2cf95f62-11ed-4a2e-83c0-e1db0e75dc9e fwd="90.192.204.238" dyno= connect= service= status=503 bytes=
2015-11-07T23:33:40.176852+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?_c9_id=livepreview0&_c9_host=https://ide.c9.io" host=shrouded-savannah-6091.herokuapp.com request_id=73ebcd92-8883-4feb-b8a1-1ca06eeeca59 fwd="90.192.204.238" dyno= connect= service= status=503 bytes=
WARNING: Toolbelt v3.42.21 update available.
在heroku install
我看到我有青菜护栏5.0.3,但在heroku logs
它仍然是5.0.1。
$ heroku open
:
Opening shrouded-savannah-6091... xprop: unable to open display ''
xprop: unable to open display ''
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 461: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'https://shrouded-savannah-6091.herokuapp.com/'
done
WARNING: Toolbelt v3.42.21 update available.
您需要发布Heroku日志 - 我们不能在没有看到发生了什么事情的情况下做任何事情。您可以使用'heroku logs'或安装[LogEntries](https://devcenter.heroku.com/articles/logentries)并粘贴出现在动态提要 –
@ArturS中的错误。它在本地工作吗?还有什么是在你的问题结束日志? – thesecretmaster
我已经更新了这个问题。我更新了sass-rails,这两个日志只是我在'pg'之前看到的错误,他们仍然在那里。如果在当地工作意味着可以用heroku打开它,那么不能。我不知道当我使用Cloud 9时“本地工作”意味着什么。 –