How do you install the JRuby SDK in IntelliJ 14.1.3 and up?

345 Views Asked by At

Everything I find online is for outdated versions of IntelliJ. Not sure why this isn't working now, because it was working just up until a day ago, but the error I get in my console is:

....Compiling sass stylesheets...
Executing: jruby -S compass compile --sass-dir ./src/stylesheets --css-dir ./web-app/styles --output-style expanded --images-dir ./web-app/images --relative-assets --force
Error |
JRuby could not be started. Make sure 'jruby' exists on the PATH and try again.
Error |
No SCSS/SASS compilation will be performed
1

There are 1 best solutions below

0
On

I finally managed to get it working by closing IntelliJ, and then running the following in the command line:

launchctl setenv export $PATH:/usr/local/bin/jruby 

or if it's already in your PATH:

launchctl setenv $PATH /usr/local/bin/jruby 

(this makes sure that the location of JRuby gets in the PATH variable if it wasn't in there already), and once I relaunched IntelliJ, everything was working again.