How to uninstall RVM [duplicate] - bash

This question already has answers here:
How to remove RVM (Ruby Version Manager) from my system
(13 answers)
Closed 8 years ago.
I installed RVM using:
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
and now want to remove it from my system. How can I delete the installation or undo this action?

Just a guess from reading: https://github.com/wayneeseguin/rvm/
sudo rvm uninstall
For more info this might help:
rvm help uninstall

Related

How to run CMake in Mac? [duplicate]

This question already has answers here:
Cannot install CMake for Mac OS X 10.8 [closed]
(1 answer)
Installing cmake with home-brew
(3 answers)
Closed 3 years ago.
I'm following this video: https://www.youtube.com/watch?v=7vJJMU2gMn4
but when I tried to run cmake using the command "cmake ." on Mac (which is around 2:02 in video), the results on my Mac show that the command cmake is not found. May I ask some help to run cmake on Mac, please?
If you have homebrew, just type:
brew install cmake
Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
And then cmake
brew install cmake

After uninstall brew cannot install it back

I could not update brew update. There was fatal error all the time. I di dnot use brew for years so I thought I'll uninstall it and then install back. I run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
that went smoothly.
But after that when I try
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It tells that
-bash: /usr/local/bin/ruby: No such file or directory
When I read how to install ruby it suggests brew install ruby but I have just uninstalled it.
I've searched over google and tried a lot of different commands but nothing works.
It's often the case that bash remembers where executables were in your path and if those are later removed it gets very confused. There's ways of rehashing this to update that, but creating a new shell usually fixes the issue just the same.
Specifying the full path to the system Ruby will also work.

Getting this error when installing Cocoapods [duplicate]

This question already has answers here:
Cocoapods installation error in terminal
(3 answers)
Closed 6 years ago.
I am having an issue trying cocoapods.
Last login: Sat Mar 26 20:17:39 on console
Brians-MacBook-Air:~ katypatterson$ sudo gem install cocoapods
Password:
ERROR: Error installing cocoapods:
activesupport requires Ruby version >= 2.2.2.
Brians-MacBook-Air:~ katypatterson$
Do I have install Ruby version 2.2.2 ?
First you need install active script :
sudo gem install activesupport -v 4.2.6
sudo gem install -n /usr/local/bin cocoapods
installing ruby
in terminal write the commands below:
rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable

rbenv not showing the available ruby versions

I have installed rbenv in my vagrant machine but when I try to list all the available ruby versions rbenv versions then it gives me this output:
system (set by /home/vagrant/.rbenv/version)
Does anyone know what is this?
Are you asking what the output of that command means? I'm looking at the rbenv documentation, and I think it indicates that rbenv only knows of one version of ruby - the version that came installed with your system.
Edit: If that's not the answer you were looking for, can you tell us what you expected to see? Did you have other versions installed on that machine?
Edit 2: If you want to see a list of versions you can install onto your machine, but aren't installed yet, run:
rbenv install --list
Here is more documentation for this command. This will help!
If you have tried both rbenv install --list and ruby-build --definitions and still can't see the latest Ruby versions on the list, then you need to upgrade ruby-build because that is what rbenv uses to "know" the available versions.
For example, assuming you use Mac OS X and installed ruby-build using Homebrew, you can update ruby-build by invoking:
brew upgrade ruby-build
Now, try listing the available versions again, and you should see the latest ones there.
Edit:
The ruby-build wiki lists a couple of ways of updating it, namely the above one using Homebrew and another one where it is installed as a plugin to rbenv:
cd "$(rbenv root)"/plugins/ruby-build && git pull
Rbenv is usually installed with it's companion ruby-build
You can get the versions available to be installed with:
ruby-build --definitions
To get a list of available ruby versions you can install, type the following:
rbenv install -l
To get a list of the ruby versions already installed on your machine, type the following:
rbenv versions
To answer your question as to what the below means:
system (set by /home/vagrant/.rbenv/version)
This is telling you that the system ruby (the default ruby installed on your system) is the only ruby version installed on your vagrant machine. Rbenv is using the default system ruby because it doesn't have any other ruby versions installed yet.
To see all available versions:
rbenv install --list-all
Or
rbenv install --list
To list only stable releases for each Ruby implementation.
If you are on Mac
brew upgrade rbenv ruby-build also works.
Documentation
List rbenv versions that are possible to install
"Only latest stable releases for each Ruby implementation are shown.
With the fewest key strokes (shorter than --list and --list-all)
rbenv install -l
Want to see what is available from rbenv to install?
ruby-build --definitions
Want to narrow that down a bit?
ruby-build --definitions | grep 3.0
To upgrade to the latest rbenv and update ruby-build with newly released Ruby versions, upgrade the Homebrew packages:
brew update && brew upgrade rbenv ruby-build
Also you can always just type rbenv
Which will give you a help menu
rbenv
TLDR the manpage or github repo or just plain forgot?
Take a peek at this site for quick rbenv recollection:
https://devhints.io/rbenv
Also, you may need to brew upgrade if you have installed with brew see here.

Error Installing Homebrew - Brew Command Not Found [duplicate]

This question already has answers here:
Installing Homebrew on macOS
(24 answers)
Closed 2 years ago.
I've spent the bulk of my Friday trying to get the latest version of Ruby installed on my new MacBook Air (w/ Mountain Lion installed).
I have all the latest versions of XCode and command line tools. But I can't seem to get Homebrew to work! Here's a screenshot of where I keep getting stuck (I'm a new user, so can't embed this image).
As you can see I used the following to instal Homebrew:
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)"
While there was a "warning" it seemed as though the installation worked:
Warning: /usr/local/bin is not in your PATH.
==> Installation successful!
Despite that, when I try to run "brew doctor" I received the following:
-bash: brew: command not found
Again, I'm trying to install homebrew, so i can instal the latest version of ruby -- I'm looking to learn to code in ruby, but kind of screwed if I can even get a development environment running! :)
The warning is telling you what is wrong. The problem is that brew is kept in /usr/local/bin
So, you can try /usr/local/bin/brew doctor
To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:
export PATH=/usr/local/bin:$PATH
On Apple silicone it's
export PATH=/opt/homebrew/bin/:$PATH
Check XCode is installed or not.
gcc --version
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update
http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"
nano ~/.profile
add these lines:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
save the file:
Ctrl + X then Y then Enter
then render the changes:
source ~/.profile
This was just happening to me, but none of the suggestions above worked. I changed directories ("cd ~/tmp") and suddenly the command
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
worked for me. Prior to changing directories I had been in a directory that is a Git repository. Perhaps that was interfering with the ruby and Git commands in the Brew install script.
You can run in terminal
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
then install https://github.com/robbyrussell/oh-my-zsh.
When those complate run i.e pico editor pico .zshrc and past those lines:
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
remember use brew doctor :)
try this
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
You can use this:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
to install homebrew.

Resources