rbenv rehash无法正常工作

时间:2014-12-03 16:29:55

标签: ruby-on-rails ruby ubuntu rbenv

我正在尝试在安装新gem之后重新使用rbenv 它在我的ubuntu服务器上给了我这些错误

 rbenv: cannot rehash: /home/deployer/.rbenv/shims/.rbenv-shim exists

然而.rbenv-shims不存在

1 个答案:

答案 0 :(得分:17)

目录权限可能存在问题: https://github.com/sstephenson/rbenv/issues/238#issuecomment-11903292

FWIW - I also had this problem, and had to change permissions on the dir where it was checking for the .rbenv-shim... so it could write to the dir, so it stopped complaining.

另外,试试:

rm /home/deployer/.rbenv/shims/.rbenv-shim

并运行:

rbenv rehash