Search code examples
lessosx-mountain-lionruby-1.9.3webstorm

WebStorm LESS Filewatcher Could not find RubyGem less


I'm getting this error trying to use the WebStorm LESS File Watcher

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem less (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /Users/me/.rvm/gems/ruby-1.9.3-p194/bin/lessc:18
    from /Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14

I'm running OSX Mountain Lion

How do I fix it?

EDIT:

I did this...

gem install less
Successfully installed less-2.3.2
1 gem installed

Didn't help.

EDIT 2:

I fiddled with the path in the LESS Filewatcher setup panel

and now I get this

/Users/me/.rvm/gems/ruby-2.0.0-p195/bin/lessc --no-color bootstrap.less
env: ruby_noexec_wrapper: No such file or directory

It feels like progress, but alas I'm not compiling less to css yet.


Solution

  • Ok what I did was this

    With rvm remove all other versions of ruby

    rvm remove 2.0.0-p195
    

    Install this gem in the system version of ruby

    sudo gem install rubygems-bundler
    

    install the less gem

    sudo gem install less
    sudo gem install therubyracer
    

    I am sure someone can give me a better way of doing this but this ruby thing has a pretty steep learning curve that I really am not interested in pursuing.

    This is the way I did it...if someone wants to contribute a better way please share here to save someone else the 4 hours I just lost to it.