簡體   English   中英

嘗試推送到 heroku 時,出現“預編譯資產失敗”。

[英]when trying to push to heroku, getting 'Precompiling assets failed.'

最初,我對紗線有一些問題,我已將其刪除。 然后我已將 rails 升級到最新版本 6.0.2.2,但仍然無法正常工作。

remote:        Removing bundler (2.0.2)
remote:        Bundle completed (39.19s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        /tmp/build_25022c90f61399230fca098f2d1d781e/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/option_merger.rb:24: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
remote:        /tmp/build_25022c90f61399230fca098f2d1d781e/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/core_ext/class/attribute.rb:87: warning: The called method `class_attribute' is defined here
remote:        DEPRECATION WARNING: Single arity template handlers are deprecated. Template handlers must
remote:        now accept two parameters, the view object and the source for the view object.
remote:        Change:
remote:          >> Coffee::Rails::TemplateHandler.call(template)
remote:        To:
remote:          >> Coffee::Rails::TemplateHandler.call(template, source)
remote:         (called from <top (required)> at /tmp/build_25022c90f61399230fca098f2d1d781e/Rakefile:6)
remote:        config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
remote:        
remote:          * development - set it to false
remote:          * test - set it to false (unless you use a tool that preloads your test environment)
remote:          * production - set it to true
remote:        
remote:        /tmp/build_25022c90f61399230fca098f2d1d781e/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.2.2/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
remote:        /tmp/build_25022c90f61399230fca098f2d1d781e/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.2.2/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here
remote:        I, [2020-05-07T23:20:06.410787 #1228]  INFO -- : Writing /tmp/build_25022c90f61399230fca098f2d1d781e/public/assets/application-b8709b2dcb190c854727c34d45ec6243556029204c4461bd9b87adc5a42cdb9b.js
remote:        I, [2020-05-07T23:20:06.411224 #1228]  INFO -- : Writing /tmp/build_25022c90f61399230fca098f2d1d781e/public/assets/application-b8709b2dcb190c854727c34d45ec6243556029204c4461bd9b87adc5a42cdb9b.js.gz
remote:        rake aborted!

接着:

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: 

有什么建議么? 謝謝

嘗試在本地編譯資產rake assets:precompile ,提交更改並再次推送

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM