ruby – 错误sudo:gem:找不到命令

前端之家收集整理的这篇文章主要介绍了ruby – 错误sudo:gem:找不到命令前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在CentOS上安装 rubyrep,并且当执行sudo gem install ruby​​rep时,我收到错误sudo:gem:command not found. Sudo和gem都已安装并正常工作,而不是在组合时.

我的设定:

[rubyrep]# which sudo
/usr/bin/sudo
[rubyrep]# which gem
/usr/local/rvm/rubies/ruby-2.1.2/bin/gem
[rubyrep]# which ruby
/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby
[rubyrep]# $PATH
-bash: /usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2@global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory

解决方法

尝试没有sudo.如果你进行了ruby的root安装,你应该只使用sudo,这是不推荐的.
原文链接:https://www.f2er.com/ruby/271052.html

猜你在找的Ruby相关文章