Skip to content
This repository

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

Closed
DeltaKilo opened this Issue March 22, 2012 · 10 comments

2 participants

Dmitry Korotkov Michal Papis
Dmitry Korotkov

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.

Michal Papis
Collaborator

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
Michal Papis
Collaborator

@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

Dmitry Korotkov

ok, i'll test in couple minutes

Dmitry Korotkov

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.

Michal Papis
Collaborator

@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

Michal Papis mpapis closed this in c4244a2 March 23, 2012
Michal Papis
Collaborator

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
Dmitry Korotkov

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.

Michal Papis
Collaborator

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

Michal Papis
Collaborator

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.