Skip to content

Instantly share code, notes, and snippets.

@ebouchut
Created December 22, 2011 14:18
Show Gist options
  • Save ebouchut/1510447 to your computer and use it in GitHub Desktop.
Save ebouchut/1510447 to your computer and use it in GitHub Desktop.
(Sass/maven) Unable to launch rake using jruby-rake-plugin
java -jar ~/.m2/repository/org/jruby/jruby-complete/1.6.5/jruby-complete-1.6.5.jar -S gem env
@ebouchut
Copy link
Author

Here is the ruby file (sassify.rb) maven is calling to transform SASS into CSS:

require 'rubygems'
require 'sass'
require 'sass/exec'

abort "2 arguments required: source_dir destination_dir" if ARGV.size != 2

source_dir = ARGV[0]
dest_dir   = ARGV[1]

options = [ 
  "--update", 
  "--no-cache",
  "--style", "expanded",
  "#{source_dir}:#{dest_dir}"
]     

sass = Sass::Exec::Sass.new(options)
begin           
  puts "SASS: Converting SASS files (in #{source_dir}) into CSS files (in #{dest_dir})"
  sass.parse!   
rescue SystemExit => se
  puts "SASS: Done."
end  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment