[Rubygems-developers] [ rubygems-Bugs-28371 ] Gem.find_home should expand all the paths, including Windows
noreply at rubyforge.org
noreply at rubyforge.org
Sat Jul 10 12:39:00 EDT 2010
Bugs item #28371, was opened at 2010-07-10 13:39
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28371&group_id=126
Category: `gem install` command
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Luis Lavena (luislavena)
Assigned to: Luis Lavena (luislavena)
Summary: Gem.find_home should expand all the paths, including Windows
Initial Comment:
On Windows, find_home look for environment variables like HOME, USERPROFILE and HOMEDRIVE + HOMEPATH
The problem is that it directly assign the value obtained from it to user_home, disregarding if these variables contain slashes or backslashes.
On fetching of gems, RubyGems uses user_home to download and store remote specifications and quick indexes, which uses FileUtils.mkdir_p to create the folder structure.
The problem at this point is that FileUtils is not aware of backslashes and thus, failing.
Having consistent slashes using File.expand_path will be more consistent and reduce the chances of errors.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28371&group_id=126
More information about the Rubygems-developers
mailing list