缺少适当的命令。在使用RVM之前确保已安装它

问题描述 投票:0回答:4

我想我在Mac上安装磁铁并删除更好的触控工具,然后我的终端突然得到这个:

Last login: Tue Aug 15 16:23:47 on ttys000

ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!

WARNING:
      Errors sourcing '/Users/kenpeter/.rvm/scripts/base'.
      RVM will likely not work as expected.

ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!

WARNING:
      Errors sourcing '/Users/kenpeter/.rvm/scripts/base'.
      RVM will likely not work as expected.

当我在终端输入哪个时,它可以工作。

我的问题是,如何摆脱这种警告?

ruby macos terminal rvm
4个回答
0
投票

0
投票

我也收到了

Missing proper which command. Make sure it is installed before using RVM

启动我的shell时出现问题。

我使用nvmavnrvm并且当我开始收到错误时,通过grunt-cli在全球安装了karma-clitypescripttypingsyarn。删除所有全局包后,错误消失。

我现在无法重现这个问题。只是想我会分享以防任何人有类似的问题。


0
投票

同样的问题,但我终于通过重新安装RVM来实现它。

我没有太多运气尝试在这个问题中发布的解决方案:

https://github.com/rvm/rvm/issues/2385

https://github.com/rvm/rvm/issues/4378

也没有(重新)通过Homebrew安装RVM。我在macOS High Sierra 10.13.4(17E199)上。这是我的笔记:

# uninstalling RVM: https://stackoverflow.com/a/4747195/539149
rvm implode
# then delete all mentions of RVM in ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc

# installing RVM: http://usabilityetc.com/articles/ruby-on-mac-os-x-with-rvm/ https://rvm.io/rvm/install
gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
brew tap --repair
curl -sSL https://get.rvm.io | bash -s stable --ruby
# add RVM to bash profile (usually in one of ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc)
nano ~/.bashrc
###
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
###
# reload shell settings
source ~/.bash_profile

# upgrading RVM: https://rvm.io/rvm/upgrading
rvm get stable

我意识到如果你正处于一个火上浇油的项目中(或许它是?),这不是最好的解决方案。但我认为总是有一些幂等片段是有帮助的,你可以应用这些片段来纠正一种情况,然后再对事物进行优化。


0
投票

brew install node为我修复了它,我在做\which时遇到了一些节点错误。

© www.soinside.com 2019 - 2024. All rights reserved.