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

Closed
wildpine opened this Issue Sep 4, 2015 · 4 comments

Comments

Projects
None yet
6 participants
@wildpine

wildpine commented Sep 4, 2015

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>'
@dnesting

This comment has been minimized.

Show comment
Hide comment
@dnesting

dnesting Sep 16, 2015

Contributor

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

Contributor

dnesting commented Sep 16, 2015

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

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein Oct 7, 2015

Member

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.

Member

chriseppstein commented Oct 7, 2015

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.

@lowenthal-jason

This comment has been minimized.

Show comment
Hide comment
@lowenthal-jason

lowenthal-jason Feb 27, 2016

@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

@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

This comment has been minimized.

Show comment
Hide comment
@patrickhayescom

patrickhayescom Mar 15, 2016

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)

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