使用 rvm 安装 gem [英] installing gems using rvm
问题描述
尝试使用 rvm 安装 gems 时出现此错误
When trying to install gems using rvm i get this error
$ rvm gem install sproutcore
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/tee/.gem/specs
但它在 rvm 网站上说您不应该使用 sudo,所以我不确定我的设置有什么问题
but it says on the rvm site that you should not use sudo so I'm not sure whats wrong with my setup
当我输入 $GEM_HOME 时,它显示该目录指向 rvm 目录
when i type $GEM_HOME it shows that the directory is pointing to the rvm dir
$GEM_HOME
bash: /home/tee/.rvm/gems/ruby-1.8.7-p302: is a directory
任何想法我做错了什么?
Any ideas what I'm doing wrong?
推荐答案
您的 .gem 文件夹存在权限问题.确保所有者是您当前的用户.
There's a permission issue with your .gem folder. Make sure the owner is your current user.
sudo chown -R tee /home/tee/.gem
如果它不起作用,请删除 .gem 文件夹.它会在您更新 gem 缓存时自动创建.
If it doesn't work, remove the .gem folder. It is automatically created when you update the gem cache.
另外,请确保您从未将 sudo 与 rvm 一起使用.
Also, make sure you never used sudo with rvm.
这篇关于使用 rvm 安装 gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!