JRuby uses incorrect Gem.bindir when env var GEM_HOME points elsewhere
----------------------------------------------------------------------
Key: JRUBY-5795
URL: http://jira.codehaus.org/browse/JRUBY-5795
Project: JRuby
Issue Type: Bug
Reporter: Stephen Bannasch
Assignee: Thomas E Enebo
RVM uses the env var GEM_HOME for the currently selected Ruby VM.
If you are using a different RVM-installed Ruby than JRuby and run JRuby
directly Gem.ruby will reference the running Jruby executable but Gem.bindir
will point to the selected RVM Ruby instead of the JRuby Gem.bindir.
This could lead to *very* confusing errors.
{code}
$ rvm use 1.8.7
Using /Users/stephen/.rvm/gems/ruby-1.8.7-p334
Running /Users/stephen/.rvm/hooks/after_use
$ echo $GEM_HOME
/Users/stephen/.rvm/gems/ruby-1.8.7-p334
$ ruby -e 'require "rubygems"; puts Gem.bindir'
/Users/stephen/.rvm/gems/ruby-1.8.7-p334/bin
$ /Users/stephen/.rvm/rubies/jruby-1.6.1/bin/jruby --version
jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-12 85838f6) (Java HotSpot(TM) 64-Bit
Server VM 1.6.0_24) [darwin-x86_64-java]
$ /Users/stephen/.rvm/rubies/jruby-1.6.1/bin/jruby -e 'require "rubygems"; puts
Gem.ruby'
/Users/stephen/.rvm/rubies/jruby-1.6.1/bin/jruby
$ /Users/stephen/.rvm/rubies/jruby-1.6.1/bin/jruby -e 'require "rubygems"; puts
Gem.bindir'
/Users/stephen/.rvm/gems/ruby-1.8.7-p334/bin
$ unset GEM_HOME
$ /Users/stephen/.rvm/rubies/jruby-1.6.1/bin/jruby -e 'require "rubygems"; puts
Gem.bindir'
/Users/stephen/.rvm/rubies/jruby-1.6.1/bin
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email