Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

installation of jruby[-head] failed when system-wide rubygems flag "--user-install" set #848

Closed
DeltaKilo opened this Issue · 10 comments

2 participants

@DeltaKilo

This makes installation of all versions of jruby impossible(and pretty hard to debug:) on dists where this flag is set by default in /etc/gemrc ex. ArchLinux.

@mpapis
Owner

what was your selected ruby at this time ?

by default /etc should not be read by rubies compiled by rvm, there was a bug in rubygems that lead to reading /etc - but it was fixed in 1.8.20

you could try to reproduce after:

rvm rubygems latest-1.8
@mpapis mpapis was assigned
@mpapis
Owner

@DeltaKilo you need to use ruby before installing rubygems, you can not use rvm to install rubygems in system, rvm has no knowledge of the system ruby configuration

@DeltaKilo

ok, i'll test in couple minutes

@DeltaKilo

Yes. It is reproducible.
http://pastebin.com/QZ354j3J

As you can see, jruby installator tries to install basic gems in ~/.gem

As of mine, we should make test before installing jruby on environment that this issue hurts and display warning if so. It have taken a day for me to find and comment out this flag in gemrc.

@mpapis
Owner

@DeltaKilo this is bug of rubygems included in jruby, I have already talked to #jruby IRC and we agreed that it should be quite safe to include a patch to fix it - i will create this patch shortly

@mpapis mpapis closed this in c4244a2
@mpapis
Owner

the error occurs only for 1.8 compatibility mode, use the command bellow to fix it:

rvm reinstall jruby-head --1.8 --patch rubygems_etc
@DeltaKilo

Ha. I just have tried to make the same file in home dir .gemrc for those who can accidentally set it user-wide and i got using given oneliner above.

http://pastebin.com/FJUHJC8d

.rvm/log/jruby-1.6.7/patch.apply.rubygems_etc.log
http://pastebin.com/1c6wmDcU

Anyway. Let the Google index and help those.

@mpapis
Owner

I need to add few warnings for the bad settings in gemrc like:

  • gem: -n/path/to/bin
  • gem_install: --user-install

scheduled for 1.11.2

@mpapis
Owner

ready -> #855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.