您好,我尝试将 ruby on Rails 应用程序部署到 heroku,这是我的错误
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to whispering-peak-4064.
remote:
To https://git.heroku.com/whispering-peak-4064.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/whispering-peak-4064.git'
我在这里看到了很多解决方案,我尝试运行这些命令:
RAILS_ENV=生产包执行 rake Assets :预编译
提取 Assets :预编译
我的 rake 中止了!
我按照此处找到的一些答案添加到我的 config\application.rb
中:
require 'sprockets/railtie'
config.assets.initialize_on_precompile = false
但徒劳地我仍然遇到同样的问题。
PS:我使用的是Rails 4.2.5
最佳答案
我认为这一行导致了您的错误:
.clearfix:before, .clearfix:after { content: : " "; display: table; }
应该是
.clearfix:before, .clearfix:after { content: " "; display: table; }
关于ruby-on-rails - 预编译 Assets 失败且 rake 中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34456318/