You are not logged in.

#1 2012-11-25 12:36:40

barraponto
Member
From: Campinas, Brazil
Registered: 2009-10-15
Posts: 20

rvm, system ruby, gem paths

I used to run rvm on its own, but then gvim required me to install the ruby package.
I thought, since my usage of rvm has dimmed, that I could use system ruby all the time, and only switch when (if) needed.
So i left the rvm stuff in my bashrc (setting rvm $PATH and sourcing rvm) and tried to set it to use system ruby by default using `rvm reset`.

Now, when I start a new shell, `which ruby` returns /usr/bin/ruby (the system ruby). Yet `rvm current` returns 'ruby-1.9.3-p194' which is not the system version (ruby 1.9.3_p327-1). And worse, `rvm gemdir` returns /home/barraponto/.rvm/gems/ruby-1.9.3-p194 while system ruby uses /usr/lib/ruby/gems/1.9.1 or /usr/lib/ruby/gems/1.9.1
These issues are gone as soon as I run `rvm use system`

Also, the default gemrc sets --user-install as a default flag for gem, although rvm doesn't like that. So I don't know what to do.

Issues: how do I get rvm to use rvm system by default? what should i do about gemrc?

Offline

#2 2012-11-26 20:28:19

secondplanet
Member
Registered: 2012-09-23
Posts: 29

Re: rvm, system ruby, gem paths

.

Last edited by secondplanet (2017-11-27 07:45:40)

Offline

#3 2012-12-17 20:38:43

brendan_e
Member
Registered: 2012-05-15
Posts: 7

Re: rvm, system ruby, gem paths

I'm having the same issue with RVM complaining about my gemrc file:

Whenever I switch directories or do anything else that invokes RVM I receive this warning:

BEWARE! rubygems "--user-install" option is not recommended for RVM installations.
Double check your /etc/gemrc. You could remove this warning by adding 'export rvm_ignore_gemrc_issues=1' to your /home/brendan/.rvmrc

I suppose I could follow the suggestion for removing this warning, but I'm leery to ignore any warnings that I haven't been able to find any documentation for.
---------------------------------

$ rvm use system

Doesn't fix this for me, in face it invokes the same warning

---------------------------------

I did find this in the /etc/.gemrc :

# --user-install is used to install to $HOME/.gem/ by default since we want to separate
#                pacman installed gems and gem installed gems
gem: --user-install

But it has the feeling of a hack, again I'd love to at least find a slightly more in-depth explanation for this

Last edited by brendan_e (2012-12-17 20:40:32)

Offline

#4 2012-12-22 22:02:43

secondplanet
Member
Registered: 2012-09-23
Posts: 29

Re: rvm, system ruby, gem paths

.

Last edited by secondplanet (2017-11-27 07:45:20)

Offline

#5 2012-12-22 22:20:48

brendan_e
Member
Registered: 2012-05-15
Posts: 7

Re: rvm, system ruby, gem paths

Thank you barraponto!

Offline

Board footer

Powered by FluxBB