我正在尝试在CentOS上安装
rubyrep,并且当执行sudo gem install rubyrep时,我收到错误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,这是不推荐的.