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?
请先登录再写评论。
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.
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.
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)?
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."
And what output gives
and
? You need JAVA_HOME environment variable to point to correct JRE installation in order for jruby (and jgem too) to work
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.
I've filed a bug - http://www.jetbrains.net/jira/browse/RUBY-3816. Feel free to vote, track status and comment it.