Heroku未更新,出现错误“系统中未检测到纱线可执行文件”

时间:2018-11-10 03:39:50

标签: ruby-on-rails ruby heroku

我正在为Udemy课程开发Web应用程序,即使在预览中一切正常,我也注意到heroku有时没有收到更新。当我尝试git push heroku master时,会发生以下情况:

Counting objects: 219, done.
Compressing objects: 100% (216/216), done.
Writing objects: 100% (219/219), 607.44 KiB | 6.20 MiB/s, done.
Total 219 (delta 44), 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.4.1
remote: -----> Installing dependencies using bundler 1.15.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        Fetching gem metadata from https://rubygems.org/.........
remote:        Fetching version metadata from https://rubygems.org/..
remote:        Fetching dependency metadata from https://rubygems.org/.
remote:        Using rake 12.3.1
remote:        Fetching concurrent-ruby 1.1.2
remote:        Using minitest 5.11.3
remote:        Using thread_safe 0.3.6
remote:        Using builder 3.2.3
remote:        Using erubi 1.7.1
remote:        Using mini_portile2 2.3.0
remote:        Using crass 1.0.4
remote:        Fetching rack 2.0.6
remote:        Using nio4r 2.3.1
remote:        Using websocket-extensions 0.1.3
remote:        Using mini_mime 1.0.1
remote:        Using arel 9.0.0
remote:        Using mimemagic 0.3.2
remote:        Using execjs 2.7.0
remote:        Using msgpack 1.2.4
remote:        Using rb-fsevent 0.10.3
remote:        Using ffi 1.9.25
remote:        Using bundler 1.15.2
remote:        Using coffee-script-source 1.12.2
remote:        Fetching method_source 0.9.1
remote:        Installing method_source 0.9.1
remote:        Using thor 0.20.0
remote:        Using multi_json 1.13.1
remote:        Using pg 1.1.3
remote:        Using puma 3.12.0
remote:        Using rails_serve_static_assets 0.0.5
remote:        Using rails_stdout_logging 0.0.5
remote:        Using tilt 2.0.8
remote:        Using turbolinks-source 5.2.0
remote:        Using tzinfo 1.2.5
remote:        Using nokogiri 1.8.5
remote:        Using websocket-driver 0.7.0
remote:        Using mail 2.7.1
remote:        Using marcel 0.3.3
remote:        Using autoprefixer-rails 9.3.1
remote:        Using uglifier 4.1.19
remote:        Using bootsnap 1.3.2
remote:        Using rb-inotify 0.9.10
remote:        Using coffee-script 2.4.1
remote:        Using rails_12factor 0.0.3
remote:        Using turbolinks 5.2.0
remote:        Using loofah 2.2.3
remote:        Using sass-listen 4.0.0
remote:        Using rails-html-sanitizer 1.0.4
remote:        Fetching sass 3.7.0
remote:        Installing concurrent-ruby 1.1.2
remote:        Installing rack 2.0.6
remote:        Installing sass 3.7.0
remote:        Using i18n 1.1.1
remote:        Using activesupport 5.2.1
remote:        Using rails-dom-testing 2.0.3
remote:        Using globalid 0.4.1
remote:        Using activemodel 5.2.1
remote:        Fetching jbuilder 2.8.0
remote:        Using actionview 5.2.1
remote:        Using activejob 5.2.1
remote:        Using activerecord 5.2.1
remote:        Using rack-test 1.1.0
remote:        Using sprockets 3.7.2
remote:        Using actionpack 5.2.1
remote:        Using bootstrap-sass 3.3.7
remote:        Using actioncable 5.2.1
remote:        Using actionmailer 5.2.1
remote:        Using activestorage 5.2.1
remote:        Using railties 5.2.1
remote:        Using sprockets-rails 3.2.1
remote:        Using coffee-rails 4.2.2
remote:        Fetching font-awesome-rails 4.7.0.4
remote:        Installing jbuilder 2.8.0
remote:        Fetching jquery-rails 4.3.3
remote:        Using rails 5.2.1
remote:        Using sass-rails 5.0.7
remote:        Installing jquery-rails 4.3.3
remote:        Installing font-awesome-rails 4.7.0.4
remote:        Bundle complete! 23 Gemfile dependencies, 68 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Post-install message from sass:
remote:        
remote:        Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
remote:        
remote:        * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
remote:          primary implementation: https://sass-lang.com/install
remote:        
remote:        * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
remote:          sassc gem: https://github.com/sass/sassc-ruby#readme
remote:        
remote:        * For more details, please refer to the Sass blog:
remote:          http://sass.logdown.com/posts/7081811
remote:        
remote:        Bundle completed (3.60s)
remote:        Cleaning up the bundler cache.
remote:        Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        Removing jbuilder (2.7.0)
remote:        Removing method_source (0.9.0)
remote:        Removing rack (2.0.5)
remote:        Removing concurrent-ruby (1.0.5)
remote:        Removing sass (3.6.0)
remote:        The latest bundler is 2.0.0.pre.1, but you are currently running 1.15.2.
remote:        To update, run `gem install bundler --pre`
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        Yarn executable was not detected in the system.
remote:        Download Yarn at https://yarnpkg.com/en/docs/install
remote:        I, [2018-11-10T02:53:43.116047 #407]  INFO -- : Writing /tmp/build_6086175200f5550c5b9817387635ee22/public/assets/application-50b71e7b0b661292fd6fba40f84e1a84bfbb82bd7cccf29f36f75e6851fc30f1.js
remote:        I, [2018-11-10T02:53:43.116490 #407]  INFO -- : Writing /tmp/build_6086175200f5550c5b9817387635ee22/public/assets/application-50b71e7b0b661292fd6fba40f84e1a84bfbb82bd7cccf29f36f75e6851fc30f1.js.gz
remote:        rake aborted!
remote:        Sass::SyntaxError: Invalid CSS after "...top: 4px solid ": expected ";", was "\  ;"
remote:        (sass):4014
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1305:in `expected'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1235:in `expected'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1230:in `tok!'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:815:in `block in try_declaration'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1281:in `rethrow'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:820:in `try_declaration'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:743:in `declaration_or_ruleset'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:708:in `block_child'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:700:in `block_contents'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:689:in `block'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:681:in `ruleset'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:707:in `block_child'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:700:in `block_contents'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:137:in `stylesheet'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:41:in `parse'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/engine.rb:414:in `_to_tree'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/engine.rb:290:in `render'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:48:in `call'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:28:in `call'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote:        /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to haunted-pumpkin-39985.
remote: 
To https://git.heroku.com/haunted-pumpkin-39985.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/haunted-pumpkin-39985.git'

我注意到错误“在系统中未检测到纱线可执行文件”。我到处搜索,并按照安装纱的说明和此问题中的说明进行操作:Rails precompile assets Yarn executable was not detected

仍然没有帮助。我不确定这是否是为什么heroku无法更新的问题。我也注意到运行

的评论
gem install bundler --pre

我这样做了,终端上的一切似乎都可以正常安装,但是即使在推送后,在尝试推送到heroku时,我仍然会遇到相同的错误。非常感谢您的帮助,我感觉自己在这里看不到任何东西。

编辑:对我来说摆脱这个错误的原因是

gem install sassc

我现在有一个完全不同的错误,但是如果我不明白,那是针对另一个线程的错误。谢谢大家的帮助!

1 个答案:

答案 0 :(得分:0)

对于这个特定问题,我的问题是Sass。正在运行

gem install sassc

为我解决了这个问题。我仍然无法部署到heroku来处理Bundler问题,但是不再存在关于预编译资产的问题。