"gem unpack" requires write access to gem home in 1.3.6

Steve Madsen's Avatar

Steve Madsen

23 Feb, 2010 02:40 AM

Running "gem unpack " in a directory of my own (happens to be within a Rails vendor/gems tree) raises a new exception on 1.3.6:

$ gem unpack thinking-sphinx --backtrace
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
    /Library/Ruby/Site/1.8/rubygems/installer.rb:136:in `initialize'
    /Library/Ruby/Site/1.8/rubygems/commands/unpack_command.rb:47:in `new'
    /Library/Ruby/Site/1.8/rubygems/commands/unpack_command.rb:47:in `execute'
    /Library/Ruby/Site/1.8/rubygems/commands/unpack_command.rb:40:in `each'
    /Library/Ruby/Site/1.8/rubygems/commands/unpack_command.rb:40:in `execute'
    /Library/Ruby/Site/1.8/rubygems/command.rb:258:in `invoke'
    /Library/Ruby/Site/1.8/rubygems/command_manager.rb:134:in `process_args'
    /Library/Ruby/Site/1.8/rubygems/command_manager.rb:104:in `run'
    /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:58:in `run'

This is silly, though. I shouldn't need write access to the system gems directory in order to unpack one to a new directory. This worked fine prior to the 1.3.6 update.

The problem is a (presumably new) test in Gem::Installer#initialize:

raise Gem::FilePermissionError, @gem_home unless File.writable? @gem_home

Sensible for other installation tasks, but not in this case.

  1. Support Staff 1 Posted by Eric Hodel on 23 Feb, 2010 02:43 AM

    Eric Hodel's Avatar
  2. Eric Hodel closed this discussion on 23 Feb, 2010 02:43 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac