如何在rake任务中进行罗盘编译

3

我使用rake来准备开发所需的文件。
但是我无法使用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

我正在使用带有 gemset 的 rvm。
1个回答

1
问题中的代码实际上是有效的。
可能是因为脚本不在安装compass的rvm gemset中导致的。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接