Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby 1.7.14 relies on HOME in the environment - change in behaviour from 1.7.13 #1930

Closed
ysb33r opened this Issue Aug 28, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@ysb33r
Copy link

ysb33r commented Aug 28, 2014

The easiest way to reproduce this is in a Bash shell:

unset HOME
java -cp /path/to/ruby-complete-1.7.14.jar org.jruby.Main -S gem install /another/path/anyone-of-your-choice.gem --ignore-dependencies --install-dir=/path/to/somewhere -N

Warning: Do this in a shell script, or use a throw-away shell.

If run without the unset it will pass, otherwise it fails with

ERROR:  Loading command: install (TypeError)
    can't convert nil into String
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

There could be a legitimate reason for this change, but it has caught me unawares.

My use case is for running jruby within gradle. In certain circumstances we need to unset the environment before runnign as to prevent accidental pollution by anything in the environment.

@enebo

This comment has been minimized.

Copy link
Member

enebo commented Aug 28, 2014

@ysb33r yeah this appears to be a regression from our LoadService changes. It might even explain #1927 for all I know. Thanks for reporting.

@enebo

This comment has been minimized.

Copy link
Member

enebo commented Aug 28, 2014

I think this PR will correct this issue and possibly even #1927. We will need @mkristian to get online and evaluate it. @kares did a bunch of other fixes in the PR which are other potentially issues like removing require_relative usage (jruby 1.7.x has a 1.8 mode):

mkristian/jar-dependencies#4

mkristian added a commit that referenced this issue Aug 28, 2014

@mkristian mkristian closed this Aug 28, 2014

@ysb33r

This comment has been minimized.

Copy link
Author

ysb33r commented Aug 28, 2014

Can confirm that the 1.7.15-SNAPSHOT has resolved this issue.

@enebo enebo added this to the JRuby 1.7.15 milestone Sep 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.