[Rubygems-developers] Unable to install any gems including system update due to absolute path errors on Windows
djberg96 at gmail.com
Sun Jul 22 14:32:41 EDT 2007
On 7/22/07, Wes Gamble <weyus at att.net> wrote:
> My environment:
> Windows XP
> C:\eclipse\workspace>ruby -v
> ruby 1.8.4 (2005-12-24) [i386-mswin32]
> C:\eclipse\workspace>gem environment
> RubyGems Environment:
> - VERSION: 0.9.4 (0.9.4)
> - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
> - GEM PATH:
> - c:/ruby/lib/ruby/gems/1.8
> - REMOTE SOURCES:
> - http://gems.rubyforge.org
> If I attempt to install any Rubygem, including the system update, I get
> an error informing me that a clearly absolute path is not absolute.
> Here's an example:
> C:\eclipse\workspace>gem update capistrano
> Updating installed gems...
> Attempting remote update of capistrano
> Install required dependency highline? [Yn] Y
> ERROR: While executing gem ... (ArgumentError)
> install directory
> not absolute
> This appears to be due to the following code in installer.rb:
> def expand_and_validate(directory)
> directory = Pathname.new(directory).expand_path
> unless directory.absolute?
> raise ArgumentError, "install directory %p not absolute" % directory
> which depends on the Pathname library, which in turn assumes that any
> directory that doesn't start with "/" is relative. See below:
> irb(main):001:0> require 'pathname'
> => true
> => false
> How do I fix my installation so that I can continue to use gems?
Fix pathname.rb. Using Ruby 1.8.5:
More information about the Rubygems-developers