Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

Trouble uninstalling rvm in order to install rbenv

Hi Treehouse Community,

I have just started the Ruby on Rails part of my track and one of the first things that I had to install was "rbenv". Just as I was about to install it, i found out that its not compatible with rvm(ruby version manager). Before I was on treehouse, i had tried the Michael Hartl tutorial of Ruby on Rails where I had installed rvm.

Anyway, now i'm finding out that its a bit more challenging than I thought to uninstall rvm. In the terminal I typed:

''' $rvm implode ''' and this is what I got from the terminal: ''' Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p353@railstutorial_rails_4_0'. Are you SURE you wish for rvm to implode? This will recursively remove /usr/local/rvm and other rvm traces? (anything other than 'yes' will cancel) > yes Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby) Removing rvm wrappers in /usr/local/rvm/bin Hai! Removing /usr/local/rvm rm: /etc/profile.d/rvm.sh: Permission denied Could not remove '/etc/profile.d/rvm.sh', please try removing it manually.

/usr/local/rvm has been removed.

Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still. Please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation. Also make sure to remove rvm group if this was a system installation. Finally it might help to relogin / restart if you want to have fresh environment (like for installing RVM again). '''

The problem is, i'm not very familiar with Ruby or ruby on rails so i don't know how to remove: ''' /etc/profile.d/rvm.sh ''' Please provide a "step by step" guide on how I can remove this file and also how I can check whether rvm is still on my system.

Thank you very much in advance.

Let me know if there's anything missing.

3 Answers

Stone Preston
Stone Preston
42,016 Points

to remove those files you can use the rm command

$ rm /etc/profile.d/rvm.sh
$ rm ~/.rvmrc

then you should probably check your bash_profile file and see if there is anything rvm related in there (im using sublime to edit the file, you could use nano, vim or any text editor)

$ cd ~
$ subl .bash_profile

if you see any lines relating to RVM remove them

also check .bashrc

$ subl .bashrc
Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

The first set of instructions worked. My text editor has not been synchronised with Sublime Text so "subl .bash_profile" doesn't go through.

However, I am now experiencing another problem. If it persists then I'll post it.

Stone Preston
Stone Preston
42,016 Points

you can use whatever text editor you normally use. you already have nano installed so you could use that

$ nano .bashrc