I am fairly new on Linux(using Ubuntu 10.10). I'm having some problem trying to install Rails 3.0.5 to the correct gem directory.
I have a root installation of Ruby (1.8.7) which I accidentally installed (which probably had a version of gem along with it) and RVM which I purposefully installed to manage Ruby versions. I am able to default my Ruby version using RVM, no problem.
But when I attempt to install rails using the command:
gem install rails
it installs rails on the root gems directory which is: /var/lib/gems/1.8/gems
but I want to install rails in the RVM directory instead: /.rvm/rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems
Some how, even after doing sudo apt-get purge ruby rubygems
. The bad gem is still there. I determine that by doing a whereis gem
(correct function?). Which returns /usr/bin/gem1.8 /usr/bin/gem /usr/share/man/man1/gem.1.gz
Now, how do I get rid of the bad gem and install the correct gem within RVM?
BTW, my GEM_PATH is /home/me/.rvm/gems/ruby-1.9.2-p180@rails3:/home/me/.rvm/gems/ruby-1.9.2-p180@global:
which makes this more mysterious.
Any suggestion is appreciated,
Thanks :)