在使用rbenv更新Ruby版本后,我无法使用Heroku命令行工具。
我收到以下错误信息:
> heroku
rbenv: heroku: command not found
The `heroku' command exists in these Ruby versions:
2.0.0-p195
重新从toolbelt.heroku.com下载安装工具包并未解决问题。
在使用rbenv更新Ruby版本后,我无法使用Heroku命令行工具。
我收到以下错误信息:
> heroku
rbenv: heroku: command not found
The `heroku' command exists in these Ruby versions:
2.0.0-p195
我切换回之前的 Ruby 版本 2.0.0p195 并卸载了 'heroku' gem。
rbenv global 2.0.0p195
gem uninstall heroku
然后我切换到最新的 Ruby 版本 2.0.0p353 并重新安装了 Toolbelt toolbelt.heroku.com
rbenv global 2.0.0p353
rbenv
,以下是我解决此问题的步骤。
错误信息
rbenv: heroku: command not found
The `heroku' command exists in these Ruby versions:
2.2.2
需要做什么
rbenv local 2.2.2
gem uninstall heroku
rbenv rehash
准备好了!
heroku
,您需要切换到安装它的 Ruby 版本,卸载 gem,重新安装 Toolbelt,然后将全局 Ruby 版本更改回较新的版本。 - starscream_disco_party我遇到了类似的问题。我在不同的ruby版本上安装了heroku gem,尽管我已经从官网下载了heroku toolbelt包并进行了安装,但仍然出现以下错误:
rbenv: heroku: command not found
我发现在从所有的ruby版本中卸载了gem之后,我需要运行以下命令:
rbenv rehash
之后我发现一切都运行得很完美。我从这个stackoverflow回答中发现了问题:
我也遇到了这个问题,如果你在终端中执行以下命令:
which convert
rm Users/user_name/.rbenv/shims/convert
rbenv
与brew
和heroku
二进制文件混淆了。brew
进行安装。现在,你需要确保你没有使用任何其他由rbenv
管理的Ruby
版本安装了宝石(gem)。