I have so many issues trying to update from Rails 3.2 to Rails 4.1 following the guide that I decided to uninstall Ruby, Rails and RVM (with all its gems) and start over.
RVM and Ruby Gone. $ rvm remove
But still have a bunch of GEMS that I previously installed.
$gem list
As suggested on this answer, to remove all gems do:
$for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
But I bump again on the error:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory
This is so frustrating! Using sudo does not make the fix either.
Even if I try to uninstall one by one, the system wont let me:
$rails uninstall
Could not find gem 'pg (~> 0.17.1) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
Why do I need another Gem to uninstall a Gem?!