首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >缺少正确的哪个命令。在使用RVM之前,请确保已安装RVM

缺少正确的哪个命令。在使用RVM之前,请确保已安装RVM
EN

Stack Overflow用户
提问于 2017-08-15 14:27:44
回答 4查看 1.1K关注 0票数 2

我想我在Mac上安装了Magnet,然后移除了更好的触摸工具,然后我的终端突然得到了这个:

代码语言:javascript
运行
复制
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.

当我在终端中输入哪个时,它就能工作。

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

EN

回答 4

Stack Overflow用户

发布于 2017-08-15 16:16:25

我做了yarn global install xxxx。这会导致rvm抱怨。

代码语言:javascript
运行
复制
yarn global remove xxxx

解决这个问题。

参考:

https://issues.jenkins-ci.org/browse/JENKINS-20636?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel

https://github.com/yarnpkg/yarn/issues/2064

票数 1
EN

Stack Overflow用户

发布于 2017-09-21 04:56:42

我还收到了

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

启动我的shell时出现问题。

我使用nvmavnrvm,并在开始出现错误时通过yarn全局安装了grunt-clikarma-clitypescripttypings。在删除所有全局包之后,错误消失了。

我现在不能重现这个问题,去想吧。我只是想分享一下,以防有人遇到类似的问题。

票数 0
EN

Stack Overflow用户

发布于 2018-07-07 08:33:17

同样的问题,但我最终通过重装RVM让它正常工作。

我没有太多的机会尝试问题中发布的解决方案:

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

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

也不需要通过Homebrew (重新)安装RVM。我在macOS高塞拉10.13.4 (17E199)。以下是我的笔记:

代码语言:javascript
运行
复制
# 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
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45687513

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档