Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Josh Cooper commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range It’s probably the greater than character. It’s possible to escape special chars on windows using caret {}. Maybe try '>= 2.2.0^’. The gem provider should handle that but maybe that’ll work for now? Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.373310.160130644.67931.1604035140027%40Atlassian.JIRA.
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10679 Unable to install Ruby gem on Windows with ensure and version range Change By: Mihai Buzgau Sprint: NW - 2020-10-14 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.373310.160130644.46071.1601458740024%40Atlassian.JIRA.
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10679 Unable to install Ruby gem on Windows with ensure and version range Change By: Mihai Buzgau Story Points: 2 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.373310.160130644.46070.1601458680027%40Atlassian.JIRA.
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Matt Dainty commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range Here's a summary of tests with and without a space between the operator and the version: Ensure 5.5.21 PUP-6563 reverted Comment ~>2.2.0 Windows seems to intercept the >2.2.0 and Gem only sees the ~ as a version ~> 2.2.0 =>2.2.0 Gem requires a space regardless => 2.2.0 There seems to be some secret Windows shell expansions that I'm not familiar with at play here.
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Matt Dainty commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range Mihai Buzgau if I remove the space, I get this: Error: Could not update: Execution of 'C:\opt\sensu\embedded\bin\gem.bat install -v "=>2.2.0" --no-document sensu-plugins-puppet' returned 1: ERROR: While executing gem ... (Gem::Requirement::BadRequirementError) Illformed requirement ["=>2.2.0"] C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:105:in `parse' C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:135:in `block in initialize' C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:135:in `map!' C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:135:in `initialize' C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/version_option.rb:55:in `new' C:/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/version_option.rb:55:in `block in add_version_option' C:/opt/sensu/embedded/lib/ruby/2.4.0/optparse.rb:548:in `conv_arg' C:/opt/sensu/embedded/lib/ruby/2.4.0/optparse.rb:676:in `parse' C:/opt/sensu/embedded/lib/ruby/2.4.0/optparse.rb:1581:in `block in parse_in_order'
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Matt Dainty commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range If I change my example to use '~> 2.2.0' for the ensure value as per PUP-6563 then that also explodes in the same way. If I revert the changes made by PUP-6563 then both the example in that ticket and my example start working. This leads me to suspect that the way this command was issued on Windows has changed and the quoting is now no longer needed. It makes sense therefore to revert this change, so I'll file a PR. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.373310.160130644.44300.1601309100177%40Atlassian.JIRA.
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Mihai Buzgau commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range Hi Matt Dainty Can you try to remove the space from the ensure value? Something like this: package { 'sensu-plugins-puppet': ensure => '>= 2.2.0', provider => gem, command => 'C:\\opt\\sensu\\embedded\\bin\\gem.cmd', } Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Matt Dainty commented on PUP-10679 Re: Unable to install Ruby gem on Windows with ensure and version range It's this block that is causing the problem: if Puppet.features.microsoft_windows? version = resource[:ensure] command_options << "-v" << %Q["#{version}"] if (! resource[:ensure].is_a? Symbol) and useversion else command_options << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion end For some reason the version string is treated differently on Windows and explicitly quoted. If I change the code to just use the same code as !Windows my test case works. This change looks like it was introduced by PUP-6563. Add Comment
Jira (PUP-10679) Unable to install Ruby gem on Windows with ensure and version range
Title: Message Title Matt Dainty created an issue Puppet / PUP-10679 Unable to install Ruby gem on Windows with ensure and version range Issue Type: Bug Affects Versions: PUP 5.5.21 Assignee: Unassigned Components: Types and Providers Created: 2020/09/28 8:20 AM Priority: Normal Reporter: Matt Dainty Puppet Version: 5.5.21 Puppet Server Version: n/a OS Name/Version: Windows 2012R2 The following example on Windows doesn't work: package { 'sensu-plugins-puppet': ensure => '>= 2.2.0', provider => gem, command => 'C:\\opt\\sensu\\embedded\\bin\\gem.cmd', }