I am trying to install JRuby in my system, I follow the following steps:
JRUBY_HOME = C:/jruby-1.7.2
;C:\\jruby-1.1.5\\bin;
to the end of that variable. And then I am running the command:
C:\Users\sitanshu\rubyApp\jruby-1.7.2>jruby -v
then it shows the following error:
jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot(TM) Client VM 1.7.0-ea-b19 [Windows Vista-x86]
NameError: uninitialized constant Java::JavaLang::ProcessBuilder::Redirect
const_missing at org/jruby/RubyModule.java:2677
ProcessManager at file:/C:/Users/sitanshu/rubyApp/jruby-1.7.2/lib/jruby.jar!/jruby/kernel/jruby/process_manager.rb:12
JRuby at file:/C:/Users/sitanshu/rubyApp/jruby-1.7.2/lib/jruby.jar!/jruby/kernel/jruby/process_manager.rb:6
(root) at file:/C:/Users/sitanshu/rubyApp/jruby-1.7.2/lib/jruby.jar!/jruby/kernel/jruby/process_manager.rb:3
load at org/jruby/RubyKernel.java:1046
(root) at file:/C:/Users/sitanshu/rubyApp/jruby-1.7.2/lib/jruby.jar!/jruby/kernel.rb:1
So where am I going wrong and what is the solution for that?
我将测试Java是否已更新并正常工作
java -version
Under your environment variables, make sure you have a JAVA_HOME
variable pointing to your JRE root folder, like this:
C:\\Program Files\\Java\\jre7\\
Make sure your Java JRE bin folder is also part of your PATH
variable:
;C:\\Program Files\\Java\\jre7\\bin\\
Additionally, when you are adding jruby to your PATH
variable, make sure you are referencing the correct folder location. In the example you have given, you are installing jruby to C:\\jruby-1.7.2
, but then you are actually referring to this different folder C:\\jruby-1.1.5
in your PATH
configuration.
Also, when you are defining your JRUBY_HOME variable, make sure you are using backslash \\
characters. In your example above you used a forward slash /
character. Remember, that windows uses backslashes between folders.
Finally, after you've made all your environment variable changes, remember to open a new command window for your changes to take effect.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.