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

  • Home
  • SEARCH
  • 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 8599899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:29:51+00:00 2026-06-12T01:29:51+00:00

I am trying to follow Sass -> CSS converter code on Sass website .

  • 0

I am trying to follow Sass -> CSS converter code on Sass website.

template = File.load('stylesheets/sassy.sass')
sass_engine = Sass::Engine.new(template)
output = sass_engine.render
puts output

And I get this error while I’m trying to File.load

SyntaxError in PublishController#index

/Users/jkim/rails/support-rhapsody/app/assets/stylesheets/application.sass:1: target of repeat operator is not specified: /* http:/
/Users/jkim/rails/support-rhapsody/app/assets/stylesheets/application.sass:2: no .<digit> floating literal anymore; put 0 before dot
   v2.0 | 20110126
      ^
/Users/jkim/rails/support-rhapsody/app/assets/stylesheets/application.sass:2: syntax error, unexpected tINTEGER
   v2.0 | 20110126
       ^
/Users/jkim/rails/support-rhapsody/app/assets/stylesheets/application.sass:3: syntax error, unexpected ':', expecting $end
   License: none (public domain) */

But when I do File.read, it works fine until output = sass_engine.render.

I get this error,

NoMethodError in PublishController#index

undefined method `[]' for nil:NilClass

What’s the difference between File.read and File.load? And if you know how to fix this problem in Sass, even better.

  • 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-12T01:29:52+00:00Added an answer on June 12, 2026 at 1:29 am

    Well in the Ruby Kernel method #load it means evaluate the text loaded as code which is what it looks like is being done here. File.read loads the text as a String.

    From sass docs for Sass::Engine.new

    Creates a new Engine. Note that Engine should only be used directly when compiling in-memory Sass code. If you’re compiling a single Sass file from the filesystem, use Sass::Engine.for_file. If you’re compiling multiple files from the filesystem, use Sass::Plugin.

    So do that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to follow the steps to compile some C code to import into
Trying to follow some basic examples and getting stuck by this code that is
I have been trying to follow mgwt and gwt-phonegap through code.google.com. It feels like
I'm trying to follow the Sequelize tutorial on their website . I have reached
So I am trying to follow this tutorial to debug my code. I tell
I'm trying to follow code-to-interface on a project. Should I be creating an interface
Trying to follow the Django Inclusion Tag documentation to create a custom template tag,
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
Im trying to follow some python code using Ctrl +click, but Im trying to
While trying to follow the python-libmemcached instructions at http://code.google.com/p/python-libmemcached/ I run into trouble at

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.