Rails App预编译资产失败

时间:2018-07-12 20:04:24

标签: ruby-on-rails-4 heroku deployment

使用

时部署到Heroku时出现问题

git push heroku master

在本地主机上的开发环境中运行没问题。几乎尝试了所有操作,甚至更改了config / environments / production.rb文件

config.assets.compile = true

这是来自heroku的构建错误日志。

----->检测到Ruby应用

----->编译Ruby / Rails

----->使用Ruby版本:ruby-2.5.1

----->使用捆绑程序1.15.2安装依赖项

   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
   Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
   Fetching gem metadata from https://rubygems.org/.........
   Fetching version metadata from https://rubygems.org/..
   Fetching dependency metadata from https://rubygems.org/.
   Using rake 12.3.1
   Using concurrent-ruby 1.0.5
   Using minitest 5.11.3
   Using thread_safe 0.3.6
   Using builder 3.2.3
   Using erubi 1.7.1
   Using mini_portile2 2.3.0
   Using crass 1.0.4
   Using rack 2.0.5
   Using nio4r 2.3.1
   Using websocket-extensions 0.1.3
   Using mini_mime 1.0.0
   Using arel 9.0.0
   Using mimemagic 0.3.2
   Using execjs 2.7.0
   Using msgpack 1.2.4
   Using rb-fsevent 0.10.3
   Using ffi 1.9.25
   Using bundler 1.15.2
   Using coffee-script-source 1.12.2
   Using method_source 0.9.0
   Using thor 0.20.0
   Using multi_json 1.13.1
   Using pg 1.0.0
   Using puma 3.11.4
   Using tilt 2.0.8
   Using turbolinks-source 5.1.0
   Using tzinfo 1.2.5
   Using i18n 1.0.1
   Using rack-test 1.0.0
   Using sprockets 3.7.2
   Using nokogiri 1.8.4
   Using websocket-driver 0.7.0
   Using marcel 0.3.2
   Fetching autoprefixer-rails 8.6.5
   Using uglifier 4.1.14
   Fetching bootsnap 1.3.1
   Using rb-inotify 0.9.10
   Using mail 2.7.0
   Using coffee-script 2.4.1
   Using turbolinks 5.1.1
   Using activesupport 5.2.0
   Using loofah 2.2.2
   Using sass-listen 4.0.0
   Using rails-dom-testing 2.0.3
   Using globalid 0.4.1
   Using activemodel 5.2.0
   Using jbuilder 2.7.0
   Using rails-html-sanitizer 1.0.4
   Using sass 3.5.6
   Using activejob 5.2.0
   Using activerecord 5.2.0
   Using actionview 5.2.0
   Using actionpack 5.2.0
   Using actioncable 5.2.0
   Using actionmailer 5.2.0
   Using activestorage 5.2.0
   Using railties 5.2.0
   Using sprockets-rails 3.2.1
   Using coffee-rails 4.2.2
   Fetching jquery-rails 4.3.3
   Installing bootsnap 1.3.1 with native extensions
   Installing autoprefixer-rails 8.6.5
   Installing jquery-rails 4.3.3
   Fetching rails-ujs 0.1.0
   Using rails 5.2.0
   Using sass-rails 5.0.7
   Fetching bootstrap-sass 3.3.7
   Installing rails-ujs 0.1.0
   Installing bootstrap-sass 3.3.7
   Bundle complete! 22 Gemfile dependencies, 65 gems now installed.
   Gems in the groups development and test were not installed.
   Bundled gems are installed into ./vendor/bundle.
   Bundle completed (4.02s)
   Cleaning up the bundler cache.
   Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
   Removing bootsnap (1.3.0)
   The latest bundler is 1.16.2, but you are currently running 1.15.2.
   To update, run `gem install bundler`

----->安装node-v8.10.0-linux-x64

----->检测rake任务

----->为Rails资产管道准备应用程序

   Running: rake assets:precompile
   Yarn executable was not detected in the system.
   Download Yarn at https://yarnpkg.com/en/docs/install
   I, [2018-07-12T19:32:06.414728 #409]  INFO -- : Writing /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/public/assets/Bali_Indonesia_2-23506d28fd96a41a6acc2362072ab7fbf4c8a0a12feca3acfef06407e53856ee.jpg
   I, [2018-07-12T19:32:11.047625 #409]  INFO -- : Writing /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/public/assets/application-79ba20a11ae68d9804715a131f3c2a7733c045995c0ca84599f2f1f0699f156c.js
   I, [2018-07-12T19:32:11.047884 #409]  INFO -- : Writing /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/public/assets/application-79ba20a11ae68d9804715a131f3c2a7733c045995c0ca84599f2f1f0699f156c.js.gz
   rake aborted!
   Sass::SyntaxError: Invalid CSS after "...lflings-regular": expected ")", was ".eot".replace(/..."
   (sass):312
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:1278:in `expected'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/lexer.rb:231:in `expected!'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:731:in `assert_tok'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:521:in `funcall'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:500:in `ident'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:291:in `unary_not'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:291:in `unary_div'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:291:in `unary_minus'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:291:in `unary_plus'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `times_div_or_mod'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `plus_or_minus'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `relational'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `eq_or_neq'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `and_expr'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:272:in `or_expr'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:474:in `space'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:415:in `interpolation'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:339:in `expr'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:722:in `assert_expr'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/script/parser.rb:68:in `parse'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:1134:in `sass_script'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:988:in `value!'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:796:in `block in try_declaration'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:1254:in `rethrow'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:809:in `try_declaration'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:732:in `declaration_or_ruleset'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:697:in `block_child'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:689:in `block_contents'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:225:in `directive_body'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:217:in `directive'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:696:in `block_child'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:689:in `block_contents'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:137:in `stylesheet'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/scss/parser.rb:41:in `parse'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/engine.rb:414:in `_to_tree'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sass-3.5.6/lib/sass/engine.rb:290:in `render'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:48:in `call'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:28:in `call'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
   /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
   Tasks: TOP => assets:precompile
   (See full trace by running task with --trace)
   W, [2018-07-12T19:32:11.077661 #409]  WARN -- : DEPRECATION WARNING on line 12 of /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/stylesheets/_bootstrap-mincer.scss:
   #{} interpolation near operators will be simplified in a future version of Sass.
   To preserve the current behavior, use quotes:

     unquote("\"<%- asset_path(\"#{$path}\".replace(/[#?].*$/, '')) + \"#{$path}\".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>\"")

   You can use the sass-convert command to automatically fix most cases.


   W, [2018-07-12T19:32:11.078320 #409]  WARN -- : DEPRECATION WARNING on line 16 of /tmp/build_b7043287c70dfa6e4632ceb96ce8aca3/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/stylesheets/_bootstrap-mincer.scss:
   #{} interpolation near operators will be simplified in a future version of Sass.
   To preserve the current behavior, use quotes:

     unquote('"<%- asset_path("#{$file}") %>"')

   You can use the sass-convert command to automatically fix most cases.

!预编译资产失败。

!推送被拒绝,无法编译Ruby应用。

!推送失败

0 个答案:

没有答案