Asantoya17
Asantoya17

Reputation: 4725

rvm: command not found MAC OX

Really, I don't know what happened. Excuse me if this question is so NOOB, but I can't find the solution for this problem.

-bash: rvm: command not found

I tried this

curl -L https://get.rvm.io | bash -s -- --version latest

but still nothing I need to see the ruby version for use the simplecov because it not works with older version from 1.9

Upvotes: 113

Views: 138772

Answers (11)

ahmnouira
ahmnouira

Reputation: 3491

If you received gpg error like this:

gpg: Can't check signature: No public key

Then run the following commands:

curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm list
rvm use 3.2.2 --install

Upvotes: 1

Jobayer Hossain
Jobayer Hossain

Reputation: 124

Close and reopen your terminal. Sometimes, the changes made during the installation of rvm are not immediately picked up by your terminal, so reopening it should resolve the problem.

Upvotes: 0

parkerqian
parkerqian

Reputation: 631

after you run sudo curl -L https://get.rvm.io | bash -s stable --ruby

you need to close the terminal ,then open again!

Upvotes: 53

k9x
k9x

Reputation: 111

As suggested by @mpapis, Do this first

$ rm -rf ~/.rvm

$ curl -L https://get.rvm.io | bash -s stable

Then, as suggested by @peterpengnz, do this and you should be fine with RVM cmd issues

$ source ~/.rvm/scripts/rvm

Upvotes: 7

Alexander Mills
Alexander Mills

Reputation: 100320

For a long-term solution, you should add this to your ~/.profile file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

to simply load rvm into a single terminal, use

source "$HOME/.rvm/scripts/rvm"

supposedly this call is more cross-platform:

. "$HOME/.rvm/scripts/rvm"

Upvotes: 5

Wilson Silva
Wilson Silva

Reputation: 11425

source /etc/profile worked for me.

Upvotes: 5

David J Roach V
David J Roach V

Reputation: 113

Close and restart terminal after installing RVM — gets me EVERY TIME.

Upvotes: 3

CodeBiker
CodeBiker

Reputation: 3263

To start using RVM, you'll need to enter source /Users/yourusername/.rvm/scripts/rvm into your terminal (of course, insert your real username in place of yourusername).

Upvotes: 1

DonRichards
DonRichards

Reputation: 146

This worked for me:

rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable

Upvotes: 10

peterpengnz
peterpengnz

Reputation: 6072

It might because the terminal not having rvm shell configuration loaded.

Try following from your terminal:

$ source ~/.rvm/scripts/rvm

then

$ type rvm | head -n 1

If the output is:

rvm is a function

You may need to add "source ~/.rvm/scripts/rvm" to your ~/.bash_profile file

Upvotes: 265

mpapis
mpapis

Reputation: 53178

you need to read all the texts that are displayed when you install RVM:

rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable

Upvotes: 57

Related Questions