5

I've found a few related posts but none match my specific problem and I think i've tried everything.

This is the error I get:

[Errno 2] No such file or directory
[cmd:  [u'sass', u'--update', u'/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.scss:/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.css', u'--stop-on-error', u'--style', u'compressed']]
[dir:  /Users/ryanwaters/Code/raw_portfolio/public/css]
[path: /usr/local/bin/sass]
[Finished]

When I put which sass in command line I get /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass

I've changed the pass several times and still can't figure out what the problem is

3 Answers 3

6

This seems pretty simple, but my problem was that I upgraded my mac's OS to Yosemite. I must've done something wrong, because my sass installation didn't carry over.

So, Sublime was throwing this error because it couldn't find sass. I reinstalled it, and everything worked as before.

2

This question is nearly an exact duplicate of SASS won't build in Sublime Text 2 [Errno 2] No such File or Directory from several days ago. If you look at my answer there, you'll see that you need to change the path to sass. You can either edit your SASS.sublime-build file and change the "cmd": line to point to /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass, or you can make a symlink to it in one of Sublime's default search directories, like /usr/local/bin or /usr/bin.

3
  • Here is my sass.sublime-build file { "cmd": ["/Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass", "sass", "--update", "$file:${file_path}/${file_base_name}.css", "--stop-on-error", "--no-cache"], "selector": "source.sass, source.scss", "line_regex": "Line ([0-9]+):", "osx": { "path": "/usr/local/bin:$PATH" }, "windows": { "shell": "true" } } And now i'm getting this error in sublime [Finished in 0.1s with exit code 127]env: ruby: No such file or directory Nov 5, 2013 at 18:41
  • Remove "sass", from the cmd - you're calling it on itself. It should read "cmd": ["/Users/ryan.../sass", "--update", ...
    – MattDMo
    Nov 5, 2013 at 20:07
  • Removed "sass", still getting [Finished in 0.0s with exit code 127]env: ruby: No such file or directory PS. Your ST2 neon color theme is rad!, just installed Nov 5, 2013 at 21:28
0

I had to manually specify the "path" and "gemPath" settings in the User Settings file for SassBeautify (e.g. "/Users/username/Library/Application Support/Sublime Text 2/Packages/User/SassBeautify.sublime-settings"). .

Here are the exact steps I followed to resolve the issue:

(derived from the documentation in the package repository).

  1. Open up a terminal
  2. Run: echo $PATH
  3. Copy the entire output of that command
  4. Open the SassBeautify settings file ("Preferences" -> "Package Settings" -> "SassBeautify" -> "Settings – User")
  5. Paste the previously copied output wrapped in quotes into the 'path' setting (or add a "path" setting if it doesn't already exist)
  6. Go back to your terminal and run: echo $GEM_PATH
  7. Copy the entire output of that command
  8. Go Back to the settings file
  9. Paste the previously copied output wrapped in quotes into the 'gemPath' setting (or add a "gemPath" setting if it doesn't already exist)
  10. Save the settings file and restart Sublime Text


Here's a screenshot of my SassBeautify settings file for reference:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.