Jira (FACT-2945) Windows: Facter 4.0.x gem install fails due to long path

11 views
Skip to first unread message

Sanjay Tripathi (Jira)

unread,
Feb 22, 2021, 4:05:02 PM2/22/21
to puppe...@googlegroups.com
Sanjay Tripathi created an issue
 
Facter / Bug FACT-2945
Windows: Facter 4.0.x gem install fails due to long path
Issue Type: Bug Bug
Affects Versions: FACT 4.0.44
Assignee: Unassigned
Components: Facter 4
Created: 2021/02/22 1:04 PM
Priority: Critical Critical
Reporter: Sanjay Tripathi

Hello,

On Windows, we have a requirement for deep nested paths, like:

C:\tester\folder_1_12345678901234567890\folder_2_12345678901234567890\folder_3_12345678901234567890\folder_4_12345678901234567890\

With the gem installed in a such a deep path, when the Facter gem install fails due to error in Ruby's open() function:

C:\tester\folder_1_12345678901234567890\folder_2_12345678901234567890\folder_3_12345678901234567890\folder_4_12345678901234567890\tstdeploy\puppet\bin>gem install --local c:\path\to\facter-4.0.49.gem
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory @ rb_sysopen - C:/tester/folder_1_12345678901234567890/folder_2_12345678901234567890/folder_3_12345678901234567890/folder_4_12345678901234567890/tstdeploy/puppet/lib/ruby/gems/2.5.0/gems/facter-4.0.49/lib/facter/facts/macosx/system_profiler/boot_rom_version.rb

How can this error be resolved on Windows when the install directory has a long nested path?

Thank you.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Sanjay Tripathi (Jira)

unread,
Feb 22, 2021, 4:21:01 PM2/22/21
to puppe...@googlegroups.com
Sanjay Tripathi updated an issue
Change By: Sanjay Tripathi
Hello,

On Windows, we have a requirement for deep nested paths, like:

C:\tester\folder_1_12345678901234567890\folder_2_12345678901234567890\folder_3_12345678901234567890\folder_4_12345678901234567890\

With the gem installed in a such a deep path, when the Facter gem install is executed, it fails due to an error in Ruby's open() function:


C:\tester\folder_1_12345678901234567890\folder_2_12345678901234567890\folder_3_12345678901234567890\folder_4_12345678901234567890\tstdeploy\puppet\bin>gem install --local c:\path\to\facter-4.0.49.gem
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory @ rb_sysopen - C:/tester/folder_1_12345678901234567890/folder_2_12345678901234567890/folder_3_12345678901234567890/folder_4_12345678901234567890/tstdeploy/puppet/lib/ruby/gems/2.5.0/gems/facter-4.0.49/lib/facter/facts/macosx/system_profiler/boot_rom_version.rb

How can this error be resolved on Windows when the install directory has a long nested path?

Thank you.

Mihai Buzgau (Jira)

unread,
Feb 23, 2021, 10:10:03 AM2/23/21
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug FACT-2945
 
Re: Windows: Facter 4.0.x gem install fails due to long path

Hi Sanjay Tripathi the long path is a limitation of Windows/ruby gem application.

There is nothing we can do on our side.

Sanjay Tripathi (Jira)

unread,
Feb 23, 2021, 11:29:03 AM2/23/21
to puppe...@googlegroups.com

Hello,

Windows can handle long paths if the path is prefixed with "\\?\".

How can we add that prefix in this situation?

The Facter gem add this prefix when it installs the gem.

Or can you please specify the particular rubygem which needs to handle this prefix, so that we can create a bug against that rubygem?

Sanjay Tripathi (Jira)

unread,
Feb 23, 2021, 11:43:03 AM2/23/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages