I'm having trouble updating ruby and rails on my Ubuntu system.
rails --version
Rails 4.1.7
ruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]
Originally I was using rbenv but I want to switch to RVM as I am not very experienced. I've used sudo apt-get remove
on rbenv, ruby, and rails but even after that the versions above do not go away. rbenv aparently exists still as well.
rbenv --version
rbenv 0.4.0-129-g7e0e85b
Installing RVM after quote on quote removing rbenv does not change the versions above either.
These uninstallation instructions may be helpful to you if you're having trouble. In brief, run rm -rf ~/.rbenv
and then remove anything rbenv added to your startup files. Note that if you installed rbenv using the instructions on the GitHub page (i.e. cloning the Git repo), you won't be able to uninstall it (or Rails, Ruby, etc., since those are presumably stored in your .rbenv directory) with apt-get
.
If you want to keep using rbenv and upgrade to the latest version of Ruby and Rails, I suggest installing ruby-build if you haven't already, then running rbenv install 2.2.1
, followed by rbenv global 2.2.1
, followed by gem install rails
. Check out the local/global stuff in the "Command Reference" section of the rbenv documentation for more information on selecting which version of Ruby you want to use.