I am trying to create a CSS file from SASS file.
I tried to do this at first.
sass_filename = "#{Rails.root}/app/assets/stylesheets/application.sass"
css = Sass::Engine.for_file(sass_filename).render
File.open("#{render_path}/stylesheets/application.css", "wb") {|f| f.write(css) }
I got error wrong number of arguments (1 for 2) on Sass::Engine.for_file() because I didn’t put anything for options field.
I am not sure how I can set the options field.
I tried
css = Sass::Engine.for_file(sass_filename, :syntax => :sass).render
but I got undefined method[]’ for nil:NilClass` error.
How do I set the default option for converting SASS to CSS ?
If you are not passing any options try using an empty hash, e.g. ‘{}’, for options: