# [Rubygems-developers] [ rubygems-Bugs-25882 ] Handling of Windows paths broken in 1.3.3

Tue May 12 08:01:19 EDT 2009

Bugs item #25882, was opened at 2009-05-12 14:01
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25882&group_id=126

Category: gem install command
Group: v1.3.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Lars Christensen (larsch)
Assigned to: Nobody (None)
Summary: Handling of Windows paths broken in 1.3.3

Initial Comment:
Installing gems from local drives other than the current is broken on Windows. RubyGems strips the drive letter (through using the URI class for something which isn't an URI).

C:\> gem install p:\path\to\mygem-2.1.18.gem

ERROR:  While executing gem ... (Errno::ENOENT)
No such file or directory - /path/to/mygem-2.1.18.gem

Then I tried to pass a valid URI:

C:\> gem install file:///p:/path/to/mygem-2.1.18.gem

But that doesn't work either;

ERROR:  could not find gem file:///p:/path/to/mygem-2.1.18.gem locally or in a repository

I believe this is because URI#path returns "/p:/path/to/mygem..." (with leading slash), which is not a valid path on Windows.

Finally, I attempted to hack RubyGems to prefix file:/// itself, but I don't understand the reason for this line of code in remote_fetcher.rb:

remote_gem_path = File.join(path, 'gems', gem_file_name)

ERROR:  While executing gem ... (Errno::ENOENT)
No such file or directory - p:/path/to/gems/mygem-2.1.18.gem

Notice the extra /gems/ path.

----------------------------------------------------------------------

You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25882&group_id=126
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.1723780483007431, "perplexity": 23796.210775539992}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-36/segments/1471982294883.0/warc/CC-MAIN-20160823195814-00242-ip-10-153-172-175.ec2.internal.warc.gz"}