Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install rails with jRuby

I am trying to install the rails with jRuby with the following command

jruby -S gem install rails -v 3.0.6

But stuck with the error :

JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
        from DefaultResolver.java:111:in `makeTime'
        from DefaultResolver.java:277:in `create'
        from DefaultResolver.java:317:in `handleScalar'
        from DefaultResolver.java:435:in `orgHandler'
        from DefaultResolver.java:455:in `node_import'
        from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import
.gen:65535:in `call'
        from CachingCallSite.java:146:in `call'
        from RubyLoadHandler.java:40:in `handle'
        from Parser.java:300:in `addNode'
        from DefaultYAMLParser.java:676:in `yyparse'
        from Parser.java:290:in `yechtparse'
        from Parser.java:284:in `parse'
        from YParser.java:152:in `load'
        from org/yecht/ruby/YParser$s_method_0_1$RUBYINVOKER$load.gen:65535:in `
call'
        from JavaMethod.java:630:in `call'
        from DynamicMethod.java:186:in `call'
        from CachingCallSite.java:309:in `cacheAndCall'
        from CachingCallSite.java:148:in `call'
        from CallOneArgNode.java:57:in `interpret'
        from LocalAsgnNode.java:123:in `interpret'
        from NewlineNode.java:104:in `interpret'
        from InterpretedMethod.java:180:in `call'
        from DefaultMethod.java:174:in `call'
        from CachingCallSite.java:309:in `cacheAndCall'
        from CachingCallSite.java:148:in `call'
        from CallOneArgNode.java:57:in `interpret'
        from LocalAsgnNode.java:123:in `interpret'
        from NewlineNode.java:104:in `interpret'
        from BlockNode.java:71:in `interpret'
        from InterpretedMethod.java:180:in `call'
        from DefaultMethod.java:174:in `call'
        from CachingCallSite.java:309:in `cacheAndCall'
        from CachingCallSite.java:148:in `call'
        from CallOneArgNode.java:57:in `interpret'

Anyone can help me to out of this error .

Thanks in advance .

like image 224
Vik Avatar asked May 18 '11 13:05

Vik


People also ask

What is the difference between JRuby and Ruby?

JRuby is similar to the standard Ruby interpreter except written in Java. JRuby features some of the same concepts, including object-oriented programming, and dynamic typing as Ruby. The key difference is that JRuby is tightly integrated with Java, and can be called directly from Java programs.

Does JRuby need Java?

Installing JRuby. For all platforms, make sure you have Java SE installed. You can test this by running the command java -version .

How do I update JRuby?

Mostly all you need to do is reinstall gems on the newly-unpacked JRuby (recommended), or migrate your existing gem installs by copying the lib/ruby/gems/* over to the new location. There's no automated update tool for JRuby itself right now. Save this answer.


1 Answers

I had this problem just a bit ago, but it was with rspec. Try this:
jruby --1.9 -S gem install rails -v 3.0.6

This tells jruby to use the ruby 1.9 interpreter.

like image 183
ryeguy Avatar answered Oct 12 '22 23:10

ryeguy