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

ruby-on-rails – Heroku构建在uglifier上失败

发布时间:2020-12-16 21:49:35 所属栏目:百科 来源:网络整理
导读:我的最小应用程序在本地运行,我没有捆绑错误.然而,当我推送到heroku时,构建在资产期间失败:预编译步骤: ...Bundle completed (3.24s)Cleaning up the bundler cache.----- Preparing app for Rails asset pipelineRunning: rake assets:precompolerake abo
我的最小应用程序在本地运行,我没有捆绑错误.然而,当我推送到heroku时,构建在资产期间失败:预编译步骤:
...
Bundle completed (3.24s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompole
rake aborted!
LoadError: cannot load such file -- uglifier
(in /tmp/build_.../app/assets/javascripts/application.js)

笔记:
我没有在本地使用uglifier宝石
我没有一个文件应用程序/ assets / javascripts / application.js

我已经尝试过这些Gemfile解决方案:
A)加入uglifier宝石
B)向资产组添加增量
C)从Gemfile中完全删除uglifier,并卸载所有版本

下一步是什么?

解决方法

在config / environments / production.rb中注释这一行
config.assets.js_compressor = :uglifier

(编辑:李大同)

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

    推荐文章
      热点阅读