简体   繁体   中英

How do I get RVM to be recognised in the terminal on my Mac?

I'm trying to get rails setup up on a mac following this tutorial and a tutorial on rubysource.com

I have installed oh-my-zsh and RVM but when I try the command:

rvm type | head -1

I get zsh: correct 'rvm' to 'rvim' [nyae]?

Which is throwing me because this should display in the terminal:

rvm is a function

If I choose 'n' I get:

zsh: command not found: rvm

and if I choose 'y' I get:

Vim: Warning: Output is not to a terminal

I'm super new to using a mac (bought it yesterday) and am struggling with getting ruby and rails all set up as I do on my windows system.

Any help is much appreciated!

You have probably forgotten to add the line to your .zshrc which loads RVM.

As given at your first link:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.

If this line is in ~/.zshrc , then RVM should be loaded when you open a new shell. Otherwise, you'd have to run

source ~/.rvm/scripts/rvm

Whenever you wanted to use RVM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM