Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:43:37+00:00 2026-06-11T21:43:37+00:00

I am trying to create a CSS file from SASS file. I tried to

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:43:38+00:00Added an answer on June 11, 2026 at 9:43 pm

    If you are not passing any options try using an empty hash, e.g. ‘{}’, for options:

    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) }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a particular CSS button described here: http://www.2shared.com/file/5131551/412bd8a8/Sans_titre-1_copie.html Basically, it's a
I am trying to create a Javascript file that I can reference from other
Possible Duplicate: Dynamically loading an external CSS file I'm trying to create a dynamic
I'm trying to create a dynamic element, apply some css on it from an
I'm trying to create css buttons by using the following html markup: <a href=access.php
I'm trying to create a css menu bar that has all grey text with
I am trying to create a css menu. I would like to remove border
I am trying to create a CSS theme switcher button like below. The top
I am trying to create a multi level navigation menu with css. I guess
I'm trying to create this effect: http://www.thecssninja.com/demo/css_tree/ the problem I'm having is that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.