Rails Assets自定义清单未预先编译 [英] Rails Assets custom manifests are not precompiling

查看:107
本文介绍了Rails Assets自定义清单未预先编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况.我使用资产管道构建了一个主题"网站.有各种各样的清单:

I have a scenario as follows. I've built a "themed" site using the asset pipeline. There are a variety of manifests:

application.scss
application_light.scss
application_dark.scss

当我运行rake assets:precompile时,只有application.scss会被编译并创建为application.css.

When I run rake assets:precompile, only application.scss gets compiled and created as application.css.

这些资产在开发中我没有问题,只是在生产预编译中它们才失败.

I have no trouble with these assets in development, it is only in production pre-compilation that they fail.

我尝试过:

config.assets.precompile += %w( application_light.scss )

这也不起作用,它只是不预编译application.scss

This also does not work, it simply does not precompile anything past application.scss

推荐答案

我在这里找到了答案:

使用以下命令预编译.scss清单文件Rails 3.1的资产管道

原来,我只需要将预编译从scss更改为css.

Turns out I just needed to change the precompile to css from scss.

这篇关于Rails Assets自定义清单未预先编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆