Note that there are some explanatory texts on larger screens.

plurals
  1. POThis is how I installed JRuby on Windows -> Why did it not work?
    text
    copied!<pre><code>* Download JRuby 1.20. (zip file) * Extract the zip into C:\JRuby120 * Edit sytem "environment variables": * Add JRUBY_HOME -&gt; point it to C:\JRuby120 * Modify the PATH environment variable to point to C:\JRuby120\bin; </code></pre> <p>After all this, I open up cmd.exe and type <strong>jruby</strong></p> <p>->"The system cannot find the path specified"</p> <p>What did I do wrong?</p> <p>I removed echo_off from C:\JRuby120\bin\jruby.bat, C:\JRuby120\bin_jrubyvars.bat and C:\JRuby120\bin_jrubyvmopts.bat and invoked jruby from cmd.exe. This was the output:</p> <pre><code>C:\&gt;rem --------------------------------------------------------------------------- C:\&gt;rem jruby.bat - Start Script for the JRuby Interpreter C:\&gt;rem C:\&gt;rem for info on environment variables, see internal batch script _jrubyvars.bat C:\&gt;setlocal C:\&gt;rem Sometimes, when jruby.bat is being invoked from another BAT file, C:\&gt;rem C:\JRuby120\bin\ is incorrect and points to the current dir, not to JRuby's bin dir, C:\&gt;rem so we look on the PATH in such cases. C:\&gt;IF EXIST "C:\JRuby120\bin\_jrubyvars.bat" (set FULL_PATH=C:\JRuby120\bin\ ) ELSE (set FULL_PATH=C:\JRuby120\bin\ ) C:\&gt;call "C:\JRuby120\bin\_jrubyvars.bat" C:\&gt;rem Environment Variable Prequisites: C:\&gt;rem C:\&gt;rem JRUBY_OPTS (Optional) Default JRuby command line args. C:\&gt;rem C:\&gt;rem JAVA_HOME Must point at your Java Development Kit installation. C:\&gt;rem C:\&gt;rem ----- Save Environment Variables That May Change -------------------------- C:\&gt;set _CLASSPATH=.; C:\&gt;set _CP= C:\&gt;set _JRUBY_CP= C:\&gt;set JRUBY_BAT_ERROR=0 C:\&gt;rem ----- Verify and Set Required Environment Variables ----------------------- C:\&gt;if not "C:\Program Files\Java\jdk1.6.0_11\bin" == "" goto gotJava C:\&gt;set JRUBY_HOME=C:\JRuby120\bin\.. C:\&gt;rem ----- Prepare Appropriate Java Execution Commands ------------------------- C:\&gt;if not "" == "" goto gotCommand C:\&gt;set _JAVA_COMMAND= C:\&gt;set JAVA_COMMAND=java C:\&gt;if not "Windows_NT" == "Windows_NT" goto noTitle C:\&gt;rem set _STARTJAVA=start "JRuby" "C:\Program Files\Java\jdk1.6.0_11\bin\bin\java" C:\&gt;set _STARTJAVA=C:\Program Files\Java\jdk1.6.0_11\bin\bin\java C:\&gt;goto gotTitle C:\&gt;rem ----- Set up the VM options C:\&gt;call "C:\JRuby120\bin\_jrubyvmopts" C:\&gt;set _MEM=-Xmx500m C:\&gt;if not defined JAVA_MEM goto memOptDone C:\&gt;set _STK=-Xss1024k C:\&gt;if not defined JAVA_STACK goto stackOptDone C:\&gt;set _VM_OPTS= C:\&gt;set _RUBY_OPTS= C:\&gt;set _DFLT_VM_OPTS= C:\&gt;set _JAVA_VM=-client C:\&gt;set SAFE_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11\bin C:\&gt;set SAFE_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11\bin C:\&gt;rem C:\&gt;rem Can you believe I'm rewriting batch arg processing in batch files because batch C:\&gt;rem file arg processing sucks so bad? Can you believe this is even possible? C:\&gt;rem http://support.microsoft.com/kb/71247 C:\&gt;rem Escape any quotes. Use _S for ', _D for ", and _U to escape _ itself. C:\&gt;rem We have to escape _ itself, otherwise file names with _S and _D C:\&gt;rem will be converted to to wrong ones, when we un-escape. See JRUBY-2821. C:\&gt;set _ARGS= C:\&gt;if not defined _ARGS goto vmoptsDone C:\&gt;set _VM_OPTS= -client -Xmx500m -Xss1024k C:\&gt;set _DFLT_VM_OPTS= C:\&gt;set _MEM= C:\&gt;set _STK= C:\&gt;set _ARGS= C:\&gt;set _VAL= C:\&gt;set _CMP= C:\&gt;set _CMP1= C:\&gt;set _JAVA_VM= C:\&gt;set _RUNJAVA="C:\Program Files\Java\jdk1.6.0_11\bin\bin\java" C:\&gt;rem ----- Set Up The Boot Classpath ---------------------------------------- C:\&gt;for %i in ("C:\JRuby120\bin\..\lib\jruby*.jar") do @call :setjrubycp %i C:\&gt;if not "" == "" goto addjrubycp C:\&gt;set JRUBY_CP=C:\JRuby120\bin\..\lib\jruby.jar C:\&gt;goto :EOF C:\&gt;for %i in ("C:\JRuby120\bin\..\lib\bsf*.jar") do @call :setjrubycp %i C:\&gt;if not "C:\JRuby120\bin\..\lib\jruby.jar" == "" goto addjrubycp C:\&gt;set JRUBY_CP=C:\JRuby120\bin\..\lib\jruby.jar;C:\JRuby120\bin\..\lib\bsf.jar C:\&gt;goto :EOF C:\&gt;rem ----- Set Up The System Classpath ---------------------------------------- C:\&gt;for %i in ("C:\JRuby120\bin\..\lib\*.jar") do @call :setcp %i C:\&gt;if not "" == "" goto add C:\&gt;set CP=C:\JRuby120\bin\..\lib\bsf.jar C:\&gt;goto :EOF C:\&gt;if not "C:\JRuby120\bin\..\lib\bsf.jar" == "" goto add C:\&gt;set CP=C:\JRuby120\bin\..\lib\bsf.jar;C:\JRuby120\bin\..\lib\jruby.jar C:\&gt;goto :EOF C:\&gt;if not "C:\JRuby120\bin\..\lib\bsf.jar;C:\JRuby120\bin\..\lib\jruby.jar" == "" goto add C:\&gt;set CP=C:\JRuby120\bin\..\lib\bsf.jar;C:\JRuby120\bin\..\lib\jruby.jar;C:\JRuby120\bin\..\lib\profile.jar C:\&gt;goto :EOF C:\&gt;goto :EOF C:\&gt;if 0 == 0 "C:\Program Files\Java\jdk1.6.0_11\bin\bin\java" -client -Xmx500m -Xss1024k -Xbootclasspath/a:"C:\JRuby120\bin\..\lib\jruby.jar;C:\JRuby120\bin\..\lib\bsf.jar" -classpath "C:\JRuby120\bin\..\lib\bsf.jar;C:\JRuby120\bin\..\lib\jruby.jar;C:\JRuby120\bin\..\lib\profile.jar;.;" -Djruby.home="C:\JRuby120\bin\.." -Djruby.lib="C:\JRuby120\bin\..\lib" -Djruby.shell="cmd.exe" -Djruby.script=jruby.bat org.jruby.Main C:\&gt;set E=3 C:\&gt;call "C:\JRuby120\bin\_jrubycleanup" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload