2015-04-12 142 views
4

一切工作正常在我的電腦,但我不能推到Heroku。
我做的所謂流行的回報率教程「 Ruby on Rails的教程(第三版)」,他們希望我有行的Gemfile紅寶石sass-rails寶石和heroku推送錯誤

gem 'sass-rails', '5.0.1' 

沒有這條線我沒有問題,當我推的,但如果加入這一行,我得到:

->git push heroku master 
Counting objects: 3, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (3/3), done. 
Writing objects: 100% (3/3), 321 bytes | 0 bytes/s, done. 
Total 3 (delta 2), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Ruby app detected 
remote: -----> Compiling Ruby/Rails 
remote: -----> Using Ruby version: ruby-2.2.1 
remote: -----> Installing dependencies using 1.7.12 
remote:  Ruby version change detected. Clearing bundler cache. 
remote:  Old: ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-linux] 
remote:  New: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] 
remote:  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
remote:  Fetching gem metadata from https://rubygems.org/........... 
remote:  Using rake 10.4.2 
remote:  Installing minitest 5.5.1 
remote:  Installing i18n 0.7.0 
remote:  Installing thread_safe 0.3.5 
remote:  Installing builder 3.2.2 
remote:  Installing mini_portile 0.6.2 
remote:  Installing erubis 2.7.0 
remote:  Installing rack 1.6.0 
remote:  Installing mime-types 2.4.3 
remote:  Installing coffee-script-source 1.9.1.1 
remote:  Installing arel 6.0.0 
remote:  Installing execjs 2.5.2 
remote:  Installing thor 0.19.1 
remote:  Installing json 1.8.2 
remote:  Using bundler 1.7.12 
remote:  Installing multi_json 1.11.0 
remote:  Installing rails_stdout_logging 0.0.3 
remote:  Using rdoc 4.2.0 
remote:  Installing rails_serve_static_assets 0.0.4 
remote:  Installing tilt 1.4.1 
remote:  Installing sass 3.4.13 
remote:  Installing tzinfo 1.2.2 
remote:  Installing rack-test 0.6.3 
remote:  Installing sprockets 3.0.0 
remote:  Installing mail 2.6.3 
remote:  Installing coffee-script 2.4.1 
remote:  Installing uglifier 2.5.3 
remote:  Installing sdoc 0.4.0 
remote:  Installing rails_12factor 0.0.2 
remote:  Installing activesupport 4.2.0 
remote:  Installing rails-deprecated_sanitizer 1.0.3 
remote:  Installing globalid 0.3.5 
remote:  Installing activemodel 4.2.0 
remote:  Installing jbuilder 2.2.3 
remote:  Installing activejob 4.2.0 
remote:  Installing activerecord 4.2.0 
remote:  Installing pg 0.17.1 
remote:  Installing nokogiri 1.6.6.2 
remote:  Installing rails-dom-testing 1.0.6 
remote:  Installing loofah 2.0.1 
remote:  Installing rails-html-sanitizer 1.0.2 
remote:  Installing actionview 4.2.0 
remote:  Installing actionpack 4.2.0 
remote:  Installing actionmailer 4.2.0 
remote:  Installing sprockets-rails 2.2.4 
remote:  Installing railties 4.2.0 
remote:  Installing coffee-rails 4.1.0 
remote:  Installing jquery-rails 4.0.3 
remote:  Installing rails 4.2.0 
remote:  Installing sass-rails 5.0.1 
remote:  Installing turbolinks 2.3.0 
remote:  Your bundle is complete! 
remote:  Gems in the groups development and test were not installed. 
remote:  It was installed into ./vendor/bundle 
remote:  Bundle completed (31.90s) 
remote:  Cleaning up the bundler cache. 
remote:  Could not detect rake tasks 
remote:  ensure you can run `$ bundle exec rake -P` against your app with no environment variables present 
remote:  and using the production group of your Gemfile. 
remote:  This may be intentional, if you expected rake tasks to be run 
remote:  cancel the build (CTRL+C) and fix the error then commit the fix: 
remote:  rake aborted! 
remote:  NameError: uninitialized constant Sass::Script 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `each' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `block in require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `each' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler.rb:134:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/config/application.rb:7:in `<top (required)>' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/Rakefile:4:in `require' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/Rakefile:4:in `<top (required)>' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:77:in `block in run' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run' 
remote:  /tmp/build_c3f0fc873b0d5baf26f3fbbfb448e8a1/vendor/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>' 
remote:  vendor/bundle/bin/rake:16:in `load' 
remote:  vendor/bundle/bin/rake:16:in `<main>' 
remote: 
remote: ###### WARNING: 
remote:  No Procfile detected, using the default web server (webrick) 
remote:  https://devcenter.heroku.com/articles/ruby-default-web-server 
remote: 
remote: -----> Discovering process types 
remote:  Procfile declares types -> (none) 
remote:  Default types for Ruby -> console, rake, web, worker 
remote: 
remote: -----> Compressing... done, 29.0MB 
remote: -----> Launching... done, v8 
remote:  https://warm-bayou-7787.herokuapp.com/ deployed to Heroku 
remote: 
remote: Verifying deploy... done. 
To https://git.heroku.com/warm-bayou-7787.git 
    7b733ac..a4a374f master -> master 

但是當我跑,因爲他們想要

->heroku run -a warm-bayou-7787 bundle exec rake -P 

我得到

Running `bundle exec rake -P` attached to terminal... up, run.4029 
rake aborted! 
NameError: uninitialized constant Sass::Script 
/app/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require' 
/app/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require' 
/app/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `require' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `each' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `block in require' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `each' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `require' 
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.7.12/lib/bundler.rb:134:in `require' 
/app/config/application.rb:7:in `<top (required)>' 
/app/Rakefile:4:in `require' 
/app/Rakefile:4:in `<top (required)>' 
(See full trace by running task with --trace) 
WARNING: Toolbelt v3.31.3 update available. 

我該怎麼辦?我有一種感覺,就像之前一直在做這個教程,我從來沒有任何問題,一切正常。

如果我刪除青菜,推動更多的時間,一切工作正常

回答