Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `read' for "css/path/to/file.css":String #1827

Closed
rafalkrawiec opened this issue Sep 4, 2015 · 4 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed needs info Blocked on user response

Comments

@rafalkrawiec
Copy link

Hi, I'm getting an error (like I wrote in title) while trying to use sass-convert on a directory containing css files.

Backtrace:

/Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/sass_convert.rb:244:in `block in process_file': undefined method `read' for "css/path/to/file.css":String (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/util.rb:503:in `silence_sass_warnings'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/sass_convert.rb:241:in `process_file'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/sass_convert.rb:210:in `block in process_directory'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/util.rb:647:in `block in glob'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/util.rb:647:in `glob'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/util.rb:647:in `glob'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/sass_convert.rb:187:in `process_directory'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/sass_convert.rb:40:in `process_result'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/base.rb:52:in `parse'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/lib/sass/exec/base.rb:19:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.18/bin/sass-convert:12:in `<top (required)>'
    from /usr/bin/sass-convert:23:in `load'
    from /usr/bin/sass-convert:23:in `<main>'
@nex3 nex3 added bug Something isn't working help wanted Extra attention is needed labels Sep 11, 2015
@dnesting
Copy link

(Moving my comment to a new issue #1835 since I no longer think it's the same problem.)

@chriseppstein
Copy link

Thank you for reporting this issue, but it's hard to know how to reproduce it based on your description. Please include steps to reproduce this.

@chriseppstein chriseppstein added the needs info Blocked on user response label Oct 7, 2015
@lowenthal-jason
Copy link

@chriseppstein There's really not many steps to reproduce this. My environment is Mac OSX.

Once SASS is installed:

image

If I include the backtrace, it looks just like what @wildpine posted

lowenthal-jason added a commit to lowenthal-jason/sass that referenced this issue Feb 27, 2016
@patrickhayescom
Copy link

How do I get/run the fixed version? I just got the latest versions of Sass and Compass for Windows, and the bug fix isn't there:
gem uninstall compass
gem uninstall sass
gem install sass -v 4.0.0.alpha.1
gem install compass -v 1.1.0.alpha.3
gem clean
sass-convert -R C:\Users\phayes\css_to_scss --from css --to scss --trace

sass_convert.rb:246:in block in process_file': undefined methodread' for "C:/Users/phayes/css_to_scss/style-legacy.css":String (NoMethodError)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs info Blocked on user response
6 participants