I use rake to prepare files for development.
But I can't compile my sass files with compass
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.
The code from the question actually works.
Probably it was caused beacuse the script was not in he rvm gemset where compass was installed.