Michael Durrant helped me with his comment, i was an idiot not to think that way in the first place, i just had to do:
apt-get remove rbenv
Since i didn't install it through a package manager, rather followed the instructions on GitHub, i thought that it wasn't appropriate (although i first tried apt-get uninstall instead of apt-get remove).
Michael Durrant helped me with his comment, i was an idiot not to think that way in the first place, i just had to do:
apt-get remove rbenv
Since i didn't install it through a package manager, rather followed the instructions on GitHub, i thought that it wasn't appropriate (although i first tried apt-get uninstall instead of apt-get remove).
If you installed rbenv using apt-get, then
apt-get remove rbenv
or
sudo apt-get purge --auto-remove rbenv
is a good first step. Next steps should be: nuke the ~/.rbenv directory and all references to "rbenv" in ~/.bashrc, .bash_profile, or similar shell initialization files.
I took these steps to successfully get rid of rbenv on my mac running El Capitan (10.11.4). Rbenv is a major cause of Failed to build gem native extension errors from my experience.
- Remove using brew:
brew remove rbenv - Delete
.rbenvdirectory:rm -rf ~/.rbenv
For Bash
- Open
.bash_profilefile and delete any lines with rbenv in them:vi ~/.bash_profile - Open
.bashrcfile and delete any lines with rbenv in them:vi ~/.bashrc
Finally, reload .bash_profile and .bashrc:
. ~/.bash_profile && . ~/.bashrc
For ZShell
- Open
.zprofilefile and delete any lines with rbenv in them - Open
.zshrcfile and delete any lines with rbenv in them
Finally, reload .zprofile and .zshrc:
. ~/.zprofile && . ~/.zshrc
I think you should be able to uninstall rbenv by simply removing ~/.rbenv.
rm -rf ~/.rbenv
Or, if you installed rbenv via Homebrew, you can do
rm -rf `brew --prefix`/Cellar/rbenv
Trying to uninstall rbenv
uninstall?
Uninstall Ruby, rbenv and homebrew and reinstall Ruby on Rails with RVM on MAC - Stack Overflow
any way to uninstall ruby using rbenv
Homebrew or Rbenv are very good tools to have as a dev, I would think twice before removing either.
In this case I doubt they are at fault.
Can you confirm you have installed the GCC command line utils for OSX by running $ xcode-select --install in your terminal.
Here is a useful post explaining that process but I find that command generally works fine for me.
If this succeeds what does your $ gem install rails output next?
If you are very new you and you don't need specially the last version of Ruby. You can use Rails Installer http://railsinstaller.org/fr-FR.
To uninstall brew https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md
New way
Use the uninstall command: rbenv uninstall [-f|--force] <version>
rbenv uninstall 2.1.0 # Uninstall Ruby 2.1.0
Use rbenv versions to see which versions you have installed.
Old way
To remove a Ruby version from rbenv, delete the corresponding directory in ~/.rbenv/versions. E.g.
rm -rf ~/.rbenv/versions/1.9.3-p0
Run rbenv rehash afterwards to clean up any stale shimmed binaries from the removed version.
ruby-build now adds an uninstall command to rbenv to handle the removal of ruby versions, if you want to avoid manual rm -fr (which might be considered risky) and rbenv rehash suggested by @Stephenson. For removing ruby version 1.9.3-p0 you would run the following:
rbenv uninstall 1.9.3-p0