0

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

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 级别权限,这令人困惑,因此我不确定如何解决此错误。

4

1 回答 1

1

这个错误不一定需要解决。

您的捆绑包安装正确,但无法删除缓存的 gem。除非您的硬盘空间不足,否则这是一个非常无害的错误。

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

于 2013-07-17T19:21:43.167 回答