Add JRuby 1.2.0 as a Ruby SDK - rubygems not installed warning

I have JRuby 1.2.0 installed and I've installed a few gems (rails, etc) via the console. When I added the install as an SDK, RubyMine reports a warning that says 'Rubygems not installed for SDK'.

Did I not install JRuby correctly? Is there something specific that RubyMine is looking for to determine that rubygems is installed?

0
7 comments

Do you have jgem script in your JRuby bin directory? Could you please also report output of the following script? ruby -e "require 'rubygems'; puts Gem.path"
If you remove JRuby Sdk from RubyMine and add it back again, does it catch your gems?

0
Avatar
Permanently deleted user

dennis.ushakov@jetbrains.com wrote:

Do you have jgem script in your JRuby bin directory? Could you please also report output of the following script? ruby -e "require 'rubygems'; puts Gem.path"
If you remove JRuby Sdk from RubyMine and add it back again, does it catch your gems?

There is a 'jgem' ruby script in the 'bin' folder.

There's no 'ruby.bat', so I had to run the suggested command as follows.

C:\opt\jruby\1.2.0\bin>jruby -e "require 'rubygems'; puts Gem.path"
C:/opt/jruby/1.2.0/lib/ruby/gems/1.8





I tried removing and adding it again, but get the same warning. Am I doing the add correctly? I'm selecting the 'jruby.bat' file when I Add SDK.

0

If it's possible, could you please zip your installation of JRuby 1.2.0 and share it somewhere (or attach to the reply here)?

0
Avatar
Permanently deleted user

I tried again with a clean install of this ZIP - http://dist.codehaus.org/jruby/1.2.0/jruby-bin-1.2.0.zip.

I unzipped it, navigate to the 'jruby.bat' and I get a pop-up about "The system cannot find the path specified."

0

And what output gives

java -version

and

echo %JAVA_HOME%

? You need JAVA_HOME environment variable to point to correct JRE installation in order for jruby (and jgem too) to work

0
Avatar
Permanently deleted user

That's what it is, the JAVA_HOME variable was missing. I don't have JAVA_HOME globally defined, so the RubyMine process was running in an environment without that variable. When I set JAVA_HOME to a JDK or JRE and then launched RubyMine from that environment, everything started working.

Perhaps a check for JAVA_HOME when a JRuby SDK is being added would be helpful.

Thanks.

0

I've filed a bug - http://www.jetbrains.net/jira/browse/RUBY-3816. Feel free to vote, track status and comment it.

0

Please sign in to leave a comment.