0

我一直在尝试按照本教程升级 Ruby,但我在终端中收到“找不到命令:rvm”。

➜  ~  rvm
zsh: correct 'rvm' to 'rvim' [nyae]? n
zsh: command not found: rvm

在第 2 步:将 RVM 加载到 Shell 之后,我遇到了困难。我实际上已经添加

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

在 .zshrc 文件中添加一些我在类似问题的其他答案中找到的附加行。现在文件内容:

# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"

# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# For Ruby 1.9
__rvm_project_rvmrc 
alias rvm-promt=$HOME/.rvm/bin/rvm-prompt # added 2013/09/13
source $ZSH/oh-my-zsh.sh
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"

# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13

# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true" 

# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"

我已经下载了 XCode 4.6.3 并安装了命令行工具。如何使此升级生效?谢谢。

编辑:我在尝试 rvm 命令之前重新启动了终端。

4

0 回答 0