[英]How to compass compile in rake task
I use rake to prepare files for development. 我使用rake来准备开发文件。
But I can't compile my sass files with compass 但我无法用罗盘编译我的sass文件
desc "Compile to compressed css"
task :compile_compressed do
#Go to the compass project directory
Dir.chdir File.join( ENV['base_path'], CONF['dir']['compass'] ) do |dir|
file_compass_config = "/path/to/some/different/config.rb"
system "compass compile -c #{file_compass_config} --force"
end
end
I'm using rvm with a gemset. 我正在使用带有gemset的rvm。
The code from the question actually works. 问题的代码实际上是有效的。
Probably it was caused beacuse the script was not in he rvm gemset where compass was installed. 可能是因为脚本不在他安装指南针的rvm gemset中引起的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.