Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

env: ruby_executable_hooks: No such file or directory

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

like image 409
Michael Avatar asked Nov 13 '13 03:11

Michael


3 Answers

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!

like image 105
MattDMo Avatar answered Oct 10 '22 00:10

MattDMo


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

like image 42
Yas Tabasam Avatar answered Oct 10 '22 00:10

Yas Tabasam


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.

like image 43
Tony B Avatar answered Oct 10 '22 00:10

Tony B