gem command doesn't work when RUBYOPT set
-----------------------------------------
Key: JRUBY-4060
URL: http://jira.codehaus.org/browse/JRUBY-4060
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.4.0RC1
Reporter: Stephen Bannasch
Assignee: Thomas E Enebo
When the RUBYOPT env variable is set to 'rubygems' the gem command no longer
functions. Instead errors like this are returned:
{code}
$ jruby -S gem env
ERROR: Invalid option: -rubygems. See 'gem --help'.
{code}
Tested with master JRuby:
{code}
[jruby-git (master)]$ git pull
remote: Counting objects: 124, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 85 (delta 66), reused 7 (delta 7)
Unpacking objects: 100% (85/85), done.
>From git://kenai.com/jruby~main
9d76664..ab9f5ce jruby-1_4 -> origin/jruby-1_4
50ebefb..6025864 master -> origin/master
Updating 50ebefb..6025864
Fast forward
bin/_jrubyvars.bat | 3 ++-
bin/_jrubyvmopts.bat | 2 ++
bin/jruby.bat | 3 ++-
spec/java_integration/types/coercion_spec.rb | 18 ++++++++----------
src/org/jruby/RubyInstanceConfig.java | 9 +++++++--
src/org/jruby/RubyThread.java | 12 +++++++-----
src/org/jruby/exceptions/JumpException.java | 5 +++++
src/org/jruby/ext/socket/RubyTCPSocket.java | 10 +++++++++-
src/org/jruby/javasupport/JavaUtil.java | 14 +++++++-------
test/test_launching_by_shell_script.rb | 7 +++++++
test/test_timeout.rb | 9 +++++++++
11 files changed, 65 insertions(+), 27 deletions(-)
[jruby-git (master)]$ ant clean; ant
# ...
BUILD SUCCESSFUL
Total time: 33 seconds
[jruby-git (master)]$ echo $RUBYOPT
[jruby-git (master)]$ jruby -S gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-10-06 patchlevel 174) [java]
- INSTALLATION DIRECTORY: /Users/stephen/dev/test/jruby-git/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /Users/stephen/dev/test/jruby-git/bin/jruby
- EXECUTABLE DIRECTORY: /Users/stephen/dev/test/jruby-git/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.5
- GEM PATHS:
- /Users/stephen/dev/test/jruby-git/lib/ruby/gems/1.8
- /Users/stephen/.gem/jruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--env-shebang"
- "update" => "--env-shebang"
- :sources => ["http://gems.rubyforge.org", "http://gems.github.com",
"http://gems.opscode.com/"]
- REMOTE SOURCES:
- http://gems.rubyforge.org
- http://gems.github.com
- http://gems.opscode.com/
[jruby-git (master)]$ export RUBYOPT=rubygems
[jruby-git (master)]$ echo $RUBYOPT
rubygems
[jruby-git (master)]$ jruby -S gem env
ERROR: Invalid option: -rubygems. See 'gem --help'.
{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