开发者

Why does running rake gems:unpack result in a Gem::FilePermissionError

I'm attempting to upgrade the friendly_id gem in a rails project.

I have removed the old gem from the vendor directory, installed the new gem from rubygems.org. When I type:

rake gems:unpack

I get the following response:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    Yo开发者_开发知识库u don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.

Sure, I realise I can sudo it, but what I don't understand is if I would like to unpack the gem into my project vender directory, why does it need access to /usr/lib/ruby/gems....


This looks like a bug in RubyGems that has apparently been fixed.

This page seems to think it was to be part of 1.3.7:

http://rubyforge.org/tracker/index.php?func=detail&aid=27872&group_id=126&atid=575

Which version of RubyGems are you running? If you can upgrade to 1.3.7 (assuming you're not currently on it), does it fix the issue?

You can upgrade to the latest version by running gem update --system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜