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?
This should be all you need (just type this once, no need for adding more to bashrc):
rvm --default use system
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)
From what I'm aware, the main reasoning for this is avoiding conflict with any system rubies, as RVM's goal is to work independently of this. So I imagine user install is not recommended because you wouldn't want system gem having control over your RVM gems. If you actually install gems through pacman (which doesn't seem like the best way) then I'd just keep the way gemrc is and remove the warning. Otherwise, there doesn't seem to be much harm in deleting the user install option from gemrc.
Thank you barraponto!