Monday, February 02, 2009

The system cannot find the path specified when executing jruby

If you get "The system cannot find the path specified" when trying to run jruby in Windows, you need to add JRUBY_HOME and JAVA_HOME to your environment variables. JRUBY_HOME and JAVA_HOME both need to point to the root folder of jruby and Java JDK, e.g.: C:\jruby-1.1.6\ and C:\Program Files\Java\jdk1.6.0_11. You need to also add %JAVA_HOME%\bin and %JRUBY_HOME%\bin to your PATH variable. You can manage your environment variables by doing the following under Windows XP:
  1. Right click on My Computer
  2. Click Properties
  3. Click the Advance tab
  4. Click on Environment Variables

2 comments:

Anonymous said...

last part should say jruby_home. Thank you. This helped me.

Juan Pablo said...

Corrected! Thank you!