Bundle install获得全局RVM安装的权限问题

时间:2013-07-17 18:59:08

标签: ruby-on-rails ruby rvm bundle

所以我在学校集群上的机器上全局安装了RVM,我有多个用户用于学校项目。当我现在运行bundle install时,我收到以下错误:

bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rake-10.1.0.gem': Permission denied
Using rake (10.1.0)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/i18n-0.6.1.gem': Permission denied
Using i18n (0.6.1)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/multi_json-1.7.7.gem': Permission denied
Installing multi_json (1.7.7)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/activesupport-3.2.13.gem': Permission denied
Using activesupport (3.2.13)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/builder-3.0.4.gem': Permission denied
Using builder (3.0.4)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/activemodel-3.2.13.gem': Permission denied
Using activemodel (3.2.13)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/erubis-2.7.0.gem': Permission denied
Using erubis (2.7.0)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/journey-1.0.4.gem': Permission denied
Installing journey (1.0.4)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-1.4.5.gem': Permission denied
Installing rack (1.4.5)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-cache-1.2.gem': Permission denied
Installing rack-cache (1.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-test-0.6.2.gem': Permission denied
Installing rack-test (0.6.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/hike-1.2.3.gem': Permission denied
Installing hike (1.2.3)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/tilt-1.4.1.gem': Permission denied
Installing tilt (1.4.1)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/sprockets-2.2.2.gem': Permission denied
Installing sprockets (2.2.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/actionpack-3.2.13.gem': Permission denied

当前用户确实拥有sudo级别权限,这令人困惑,因此我不确定如何解决此错误。

1 个答案:

答案 0 :(得分:1)

此错误不一定需要解决。

您的软件包正在正确安装,但它无法删除缓存的宝石。这是一个非常无害的错误,除非你在硬盘空间上跑得很短。

我实际上也得到了同样的错误。问题是我的主目录是远程挂载的,因此本地root无权修改那里的项目。本地root只对本地目录具有全局写权限。我想,根据你所描述的,你有同样的问题。您可以手动删除文件,也可以指示rvm在本地计算机上的目录中安装gem。