Rvm -- reverting to system ruby

It worked once, but a few minutes later this is what I got:

$ rvm system
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

$ rvm use 1.8.6
Using /Users/me/.rvm/gems/ruby-1.8.6-p420
$ ruby -v
ruby 1.8.6 (2010-09-02 patchlevel 420) [i686-darwin10.7.0]

$ rvm system
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

$ rvm use 1.9.2
Using /Users/me/.rvm/gems/ruby-1.9.2-p180
$

$ rvm use 1.8.7
Using /Users/me/.rvm/gems/ruby-1.8.7-p334

$ rvm system
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

(OSX 10.6.7)

The system ruby is 1.8.7p-174.

The reason I want to revert back to the system ruby is because I
installed the heroku gem, and it installed without problems:

$ sudo gem install heroku
Password:
Fetching: term-ansicolor-1.0.5.gem (100%)
Fetching: mime-types-1.16.gem (100%)
Fetching: rest-client-1.6.3.gem (100%)
Fetching: configuration-1.3.1.gem (100%)
Fetching: launchy-0.4.0.gem (100%)
Fetching: heroku-2.3.6.gem (100%)
Successfully installed term-ansicolor-1.0.5
Successfully installed mime-types-1.16
Successfully installed rest-client-1.6.3
Successfully installed configuration-1.3.1
Successfully installed launchy-0.4.0
Successfully installed heroku-2.3.6
6 gems installed
Installing ri documentation for term-ansicolor-1.0.5…
Installing ri documentation for mime-types-1.16…
Installing ri documentation for rest-client-1.6.3…
Installing ri documentation for configuration-1.3.1…
Installing ri documentation for launchy-0.4.0…
Installing ri documentation for heroku-2.3.6…
Installing RDoc documentation for term-ansicolor-1.0.5…
Installing RDoc documentation for mime-types-1.16…
Installing RDoc documentation for rest-client-1.6.3…
Installing RDoc documentation for configuration-1.3.1…
Installing RDoc documentation for launchy-0.4.0…
Installing RDoc documentation for heroku-2.3.6…
$

… but the “heroku version” command gave me a “heroku unrecognized”
error. So the heroku gem must have installed in some other gem
directory. Apparently, doing “gem install heroku” (without sudo)
succeeded in installing the heroku gem in the ruby 1.9.2 gem directory.
But now rvm system doesn’t work correctly.

strange error - until you find a real solution, you could use ‘rvm
list’ to manually select the version you want to use…

-j

jake kaiden wrote in post #1008867:

strange error - until you find a real solution, you could use ‘rvm
list’ to manually select the version you want to use…

-j

No that doesn’t work. “rvm list” only produces the rubies installed
with rvm.

The rvm docs say not to use the sudo command when installing gems–or
else strange things will happen. Now that strange things are happening,
how do I undo the problems?

7stud – wrote in post #1008848:

Apparently, doing “gem install heroku” (without sudo)
succeeded in installing the heroku gem in the ruby 1.9.2 gem directory.

That isn’t correct:

$ rvm use 1.9.2
Using /Users/me/.rvm/gems/ruby-1.9.2-p180
my-imac:~ me$ rvm gemset list

gemsets for ruby-1.9.2-p180 (found in
/Users/me/.rvm/gems/ruby-1.9.2-p180)
global
rails3tutorial

my-imac:~ me$ rvm gemset use rails3tutorial
my-imac:~ me$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.9)
actionpack (3.0.9)
activemodel (3.0.9)
activerecord (3.0.9)
activeresource (3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.15)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.9)
railties (3.0.9)
rake (0.9.2, 0.8.7)
rdoc (3.8)
sqlite3-ruby (1.2.5)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.29)
my-imac:~ me$

7stud – wrote in post #1008907:

jake kaiden wrote in post #1008867:

strange error - until you find a real solution, you could use ‘rvm
list’ to manually select the version you want to use…

-j

No that doesn’t work. “rvm list” only produces the rubies installed
with rvm.

…of course, sorry for the bum lead - have you had any luck? found a
couple of things you could try -

  1. try: rvm use system

  2. update rvm: rvm update --head
    then, open a new shell and do ‘rvm reset’ - see if the problem persists.

good luck,

  • j

jake kaiden wrote in post #1009032:

7stud – wrote in post #1008907:

jake kaiden wrote in post #1008867:

strange error - until you find a real solution, you could use ‘rvm
list’ to manually select the version you want to use…

-j

No that doesn’t work. “rvm list” only produces the rubies installed
with rvm.

…of course, sorry for the bum lead - have you had any luck?

I did “rvm implode” to uninstall, which didn’t uninstall everything, so
I did a “rm -rf” on the .rvm directory. Then I reinstalled rvm and
various rubies again, but I had so many problems it took me many
uninstalls and many reinstalls before I could get rvm working again.
Now, I am
going to stay away from the “rvm system” command…and any commands
that start with “sudo”.

7stud – wrote in post #1009054:

but I had so many problems it took me many
uninstalls and many reinstalls before I could get rvm working again.
Now, I am
going to stay away from the “rvm system” command…and any commands
that start with “sudo”.

i fooled around with rvm for a while too, but ended up having problems
myself and gave it up. are you running ubuntu by any chance? if so
update alternatives is another, well, alternative…
http://blog.michaelgreenly.com/2008/08/multiple-versions-of-ruby-on-ubuntu-2.html

-j