如何构建任务“资产:预编译" [英] How to build task 'assets:precompile'
本文介绍了如何构建任务“资产:预编译"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在生产服务器上遇到该错误,无法弄清原因.运行此命令时会发生这种情况:
I'm getting that error on my production server, and can't figure out why. It happens when running this command:
bundle exec rake assets:precompile RAILS_ENV=production
我正在使用Rails 3.1.0.rc6
I'm using Rails 3.1.0.rc6
推荐答案
这很可能是由于您的config/application.rb
不需要rails/all
(默认值),但是某些自定义要求.
This is most likely due your config/application.rb
not requiring rails/all
(the default), but some custom requires.
要解决此问题,请将以下内容添加到config/application.rb
:
To resolve this, add the following to config/application.rb
:
require 'sprockets/railtie'
这篇关于如何构建任务“资产:预编译"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文