现象
已经成功安装了istats,但是仍然提示zsh: command not found: istats
sudo gem install iStats
Fetching iStats-1.6.1.gem
Building native extensions. This could take a while...
Successfully
~ » istats
zsh: command not found: istats
解决办法
gem uninstall iStats
gem install iStats --user-install
在环境变量中(vim ~/.zshrc
)增加:
#根据你的实际路径修改
export PATH="/Users/itkey/.gem/ruby/3.0.0/bin:$PATH"
source ~/.zshrc
现在在输入istats
就可以正常运行了。