Search code examples
rubygemssasswebstormrbenv

Find the location of the SASS executable. (using rbenv)


I have a working SASS installation. I can run these commands in terminal and get this output:

sass -v
Sass 3.2.9 (Media Mark)

rbenv versions
  system
* 1.9.3-p392 (set by /Users/Eric/.rbenv/version)
  2.0.0-p0

I need to locate the exectuable so that I can provide it to the Webstorm IDE as a file watcher. http://blog.jetbrains.com/webide/2013/03/file-watchers-in-webstormphpstorm-6-a-k-a-background-tasks/. I have set this up in other environments (windows, osx without rbenv) before, but can't figure out how to do it here.

If I run whereis sass, I get no output.

How do I find this executable and specify it for Webstorm?

Digging into rbenv, I see it here: /Users/Eric/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.9/bin/sass Specifying this path to webstorm does work. Is it appropriate/stable to reference this location directly, or is there a better way that doesn't depend on version numbers?


Solution

  • This is a working answer for me:

    /Users/Eric/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/sass-3.2.9/bin/sass
    

    It's not the best because I have to update the location when I upgrade SASS, but it's functional. Hope this helps someone else.

    If someone knows of a symlink to the executable that is maintained through upgrades by rbenv or ruby, please share.