删除安装在错误位置的RubyGem的.gem目录是否安全?

时间:2010-02-19 18:37:12

标签: installation rubygems

我想安装open4,所以输入了

gem install open4

给了我以下警告:

WARNING:  Installing to ~/.gem since /var/lib/gems/1.8 and   
          /var/lib/gems/1.8/bin aren't both writable.  
WARNING:  You don't have /home/myname/.gem/ruby/1.8/bin in your PATH,  
          gem executables will not run.  

然后我做了

sudo install open4  

它似乎已安装。

我怎样才能从主目录中删除额外的安装?只是删除〜/ .gem目录是合适的还是有害的?

1 个答案:

答案 0 :(得分:0)

好的,我想通了(没有手动删除目录。)键入
  红宝石环境 并在“GEM PATHS”下寻找:
   - 创业板路径:
      - /var/lib/gems/1.8
      - /home/myname/.gem/ruby/1.8
第二行是指错误安装。

然后我做了 gem uninstall open4 -i /home/myname/.gem/ruby/1.8
并得到了 已成功卸载open4-1.0.1

万岁。