简体   繁体   English

Ruby on Rails教程Heroku应用程序错误

[英]Ruby on Rails Tutorial Heroku application error

I am stuck in Michael Hartl's Ruby on Ralis (3rd Edition) on Cloud 9. 我陷入了Cloud 9上Michael Hartl的Ruby on Ralis(第3版)中。

I have tried to get heroku app working, but I am getting: 我试图让heroku应用程序正常工作,但是我得到了:

Aplication Error 应用错误

An error occurred in the application and your page could not be served. 应用程序中发生错误,无法提供您的页面。 Please try again in a few moments. 请稍后重试。

If you are the application owner, check your logs for details. 如果您是应用程序所有者,请检查日志以获取详细信息。

As Chloe suggested I've changed 'sass-rails' version and updated 'sass-rails' 就像克洛伊(Chloe)所建议的那样,我更改了'sass-rails'版本并更新了'sass-rails'

Gemfile now: 现在的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

As thesecretmaster advised I've migrated from sqlite3 to postgesql using the instructions given by heroku 正如secretmaster所建议的那样,我已经按照heroku 给出的说明从sqlite3迁移到了postgesql

bundle install: 捆绑安装:

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 logs now: 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.

In heroku install I see I have sass-rails 5.0.3, but in heroku logs it is still 5.0.1. heroku install我看到我有sass-rails 5.0.3,但是在heroku logs中仍然是5.0.1。

$ heroku open : $ 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.

It's best to close one question and ask another question to keep the problems separate. 最好关闭一个问题,再问另一个问题,以使问题分开。 Your new error is 您的新错误是

/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)

It looks like you didn't run Bundler, because you are still using 5.0.1. 您似乎没有运行Bundler,因为您仍在使用5.0.1。 It's probably an error in the Sass gem. 这可能是Sass gem中的错误。 Try to use an older version or newer version of the gem. 尝试使用旧版本或较新版本的gem。 See which versions you have installed locally. 查看您在本地安装了哪些版本。

gem list sass-rails

Try to update to the latest gem. 尝试更新到最新的宝石。 I have 5.0.3 and the latest now is 5.0.4. 我有5.0.3,最新的是5.0.4。 Remove the version from your Gemfile and run 从您的Gemfile中删除版本并运行

bundle update

If everything is working fine locally I would run: 如果在本地一切正常,我将运行:

heroku logs --tail

from your terminal and then reload the page. 从您的终端,然后重新加载页面。 If you look in the logs you should get a better understanding of what exactly the error is. 如果您查看日志,则应该更好地了解错误的确切含义。

Your problem is that heroku hates sqlite3 (read: doesn't support and doesn't allow you to have the gem in your app). 您的问题是heroku讨厌sqlite3 (阅读:不支持,并且不允许您在应用程序中使用gem)。 Here is what they have to say https://devcenter.heroku.com/articles/sqlite3 . 这就是他们不得不说的https://devcenter.heroku.com/articles/sqlite3 Instead I would migrate to postgesql. 相反,我将迁移到postgesql。 It doesn't make any difference in how your app will run, and your won't notice anything after you switch. 这对您的应用程序的运行方式没有任何影响,切换后您将不会注意到任何东西。 I use heroku postgres for my databases. 我将heroku postgres用于我的数据库。 To migrate you should just follow the instruction in the article I linked above. 要进行迁移,您应该按照上面我链接的文章中的说明进行操作。 Good Luck! 祝好运!

You can also get out of terminal without closing the window by pressing CTRL+C 您也可以通过按CTRL+C退出终端而不关闭窗口

update 1 更新1

To solve your sass error you can use this question . 为了解决您的sass错误,您可以使用这个问题 Apparently it is an issue with sass 5.0.1, so you just need to update the gem. 显然,这是sass 5.0.1的问题,因此您只需要更新gem。

update 2 更新2

Gems not updating in cloud nine could have something to do with the answer to this answer . 没有在云九中更新的宝石可能与该答案的答案有关 I Don't know much about cloud nine, sorry. 抱歉,我对云九了解不多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM