加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – ruby?? sass-rails gem和heroku推送错误

发布时间:2020-12-17 03:49:33 所属栏目:百科 来源:网络整理
导读:在我的电脑上一切正常,但我无法推送到Heroku. 我正在做一个名为“流行的RoR教程” Ruby on Rails教程(第3版)“他们希望我在Gemfile中拥有一行 gem 'sass-rails','5.0.1' 没有那条线我推动时没有问题,但如果添加这条线我得到: -git push heroku master Count
在我的电脑上一切正常,但我无法推送到Heroku.
我正在做一个名为“流行的RoR教程”
Ruby on Rails教程(第3版)“他们希望我在Gemfile中拥有一行

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.

我该怎么办?我有一种感觉,就像我之前做过那个教程一样,我从来没有遇到任何问题,一切正常.

如果我删除sass并再推一次一切正常

解决方法

我在Cloud9路由上遇到了同样的错误,并使用gemfiles中的5.0.2版修复了它.

https://github.com/josh/sprockets-es6/issues/15

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读