7

When trying to build SASS, I'm getting the following error on Sublime Text 2. I've added the SASS build plugin from here https://github.com/jaumefontal/SASS-Build-SublimeText2

env: ruby_executable_hooks: No such file or directory [Finished in 0.0s with exit code 127]

Not really sure what I should be doing here to troubleshoot this.

Thanks!!

The amount of negative votes tells me I need to add more information. The problem is I'm not quite sure what information I should be adding.

My SASS.sublime-build file inside /Library/Application Support/Sublime Text 2/Packages/SASS Build/

{

        "cmd": ["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": "/Users/vskylabv/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:/usr/local/bin:$PATH"
        },

        "windows":
        {
                "shell": "true"
        }

}

which ruby_executable_hooks /Users/vskylabv/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks

Michael
  • 589
  • 2
  • 11
  • 26

3 Answers3

3

The sass file being run is actually a script, with a hashbang line along the lines of #!/usr/bin/env ruby_executable_hooks (if it's not in sass, it's in another file being called). Sublime's environment is not necessarily the same as your command line environment, which is why you're getting the error message you're seeing. Open a terminal, and type

which ruby_executable_hooks

to find out the directory it lives in. Then, open Packages/SASS-Build/SASS.sublime-build:

{

    "cmd": ["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"
    }

}

If you're on OS X, change the "path" line in the "osx" section to:

"path": "/full/path/to/ruby_executable_hooks:/usr/local/bin:$PATH"

and save the file. Note the full path should just be the directory containing ruby_executable_hooks - for example, /Users/MichaelT/.rvm/gems/ruby-2.0.0-p247/bin.

Good luck!

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • I followed these steps exactly and was still unable to get it to work. I'll add some more details on the top of what I got. – Michael Nov 14 '13 at 20:44
  • change the path to `"/Users/vskylabv/.rvm/gems/ruby-2.0.0-p247/bin:/usr/local/bin:$PATH"`. – MattDMo Nov 14 '13 at 21:31
  • Still nothing. I'm going to have to come back to this with a fresh set of eyes later. – Michael Nov 16 '13 at 00:17
2

You need to run the following command in the Terminal to refresh the executable-hooks to the latest version. That should take care of the issue.

sudo gem install --user-install executable-hooks

Yas Tabasam
  • 10,517
  • 9
  • 48
  • 53
1

I had the same problem using an rvm installed version of sass in NetBeans 7.4.

You should switch to system ruby to avoid the rvm issues.

rvm use system

Now, check that you have sass in your system ruby:

gem list sass

Then if no sass, install the sass gem:

gem install sass

On OS X this will put sass into /usr/bin/sass

/usr/bin is in your path already so your sublime-build config should work.

Tony B
  • 323
  • 2
  • 7