small medium large xlarge

Back to: All Forums  Using JRuby
26 Jul 2015, 17:17
Jerry Ross (2 posts)

I am able to run the first example.rb in the book using ruby but not jruby. When I use jruby it says jruby is not recognized command. I have a jruby installation.

Note: I created a CLASSPATH variable and set it to c:\jruby\lib\jruby.jar; and rebooted my Acer Laptop running Windows 7

but this had no effect on the problem, except when I run:

jruby example.rb it doesn’t give me an error message – just nothing and the prompt returns now.

I looked in bin and all the jruby exe files are in there.

Why would jruby not be working?

26 Jul 2015, 17:19
Jerry Ross (2 posts)

When I use ruby example.rb I am able to run the program to completion, no errors.

Note: My PATH is c:\jruby-\bin;C:\Ruby22-x64\bin;C:\jruby\bin;C:\Program Files (x86)\Java\jdk1.7.0_45\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell

29 Jul 2015, 17:55
Erin Dees (212 posts)

Hi, Jerry.

Sorry to hear of the trouble. I’m not able to replicate this issue on my PC. I’m running 64-bit Java 8u51 and 64-bit JRuby on Windows 7, and the example runs for me.

Does JRuby work on your machine when you pass the program text inline (instead of using a Ruby file)? For example:

C:\example> jruby -e "puts 'hello'"



You must be logged in to comment