【问题标题】:Rails: rbenv rehash not working (rbenv-shim exists)Rails:rbenv rehash 不起作用(rbenv-shim 存在)
【发布时间】:2014-12-03 16:29:55
【问题描述】:

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

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

但是.rbenv-shims 不存在

【问题讨论】:

    标签: ruby-on-rails ruby ubuntu rbenv


    【解决方案1】:

    可能是issue with directory permissions @ sstephenson/rbenv:

    FWIW - 我也遇到了这个问题,并且不得不更改它正在检查 .rbenv-shim 的目录的权限......所以它可以写入该目录,所以它停止了抱怨。

    另外,试试:

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

    然后运行:

    rbenv rehash
    

    【讨论】:

    • 如何更改该目录的权限..我不是 ubuntu 人
    • 试试这个:chmod o+w /home/deployer/.rbenv/shims 或:chmod 777 /home/deployer/.rbenv/shims
    • ls -l /home/deployer/.rbenv/ 的输出是什么?
    • 我不得不删除它抱怨的文件夹。
    猜你喜欢
    • 2013-05-05
    • 1970-01-01
    • 2015-03-24
    • 2016-04-20
    • 1970-01-01
    • 2013-03-01
    • 2012-11-29
    • 2017-02-06
    • 1970-01-01
    相关资源
    最近更新 更多