I recently upgraded one of our puppet agent servers to use rubygems 2.0.0. When I run ''puppet agent --test'' after the upgrade it complains that there is an invalid option with using --include-dependencies switch (output below). Is there a way to pass arguments to puppet when using gem as the package installer to use another argument? Eg. output [root@vm1 ~]# puppet agent --test Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb Info: Caching catalog for vm1.example.com Info: Applying configuration version ''1361808741'' Error: Could not update: Execution of ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --include-dependencies Error: /Stage[main]/Base::Centos6/Package[bson]/ensure: change from ["1.8.2", "1.8.1", "1.8.0", "1.7.1", "1.7.0"] to 1.8.2 ruby java failed: Could not update: Execution of ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --include-dependencies Error: Could not update: Execution of ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --include-dependencies Error: /Stage[main]/Base::Centos6/Package[json]/ensure: change from ["1.7.7"] to 1.7.7 ruby java failed: Could not update: Execution of ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --include-dependencies Notice: Finished catalog run in 15.45 seconds Somehow it looks hard coded into the gem.rb file def install(useversion = true) command = [command(:gemcmd), "install"] command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion # Always include dependencies command << "--include-dependencies" Thanks, Matthew -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Looks like there is a bug report for it. http://projects.puppetlabs.com/issues/19140 On Monday, February 25, 2013 9:31:24 AM UTC-8, matthias wrote:> > I recently upgraded one of our puppet agent servers to use rubygems 2.0.0. > When I run ''puppet agent --test'' after the upgrade it complains that there > is an invalid option with using --include-dependencies switch (output > below). Is there a way to pass arguments to puppet when using gem as the > package installer to use another argument? > > Eg. output > > [root@vm1 ~]# puppet agent --test > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb > Info: Caching catalog for vm1.example.com > Info: Applying configuration version ''1361808741'' > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[bson]/ensure: change from > ["1.8.2", "1.8.1", "1.8.0", "1.7.1", "1.7.0"] to 1.8.2 ruby java failed: > Could not update: Execution of ''/usr/bin/gem install --include-dependencies > --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... > (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[json]/ensure: change from > ["1.7.7"] to 1.7.7 ruby java failed: Could not update: Execution of > ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' > returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Notice: Finished catalog run in 15.45 seconds > > > Somehow it looks hard coded into the gem.rb file > > def install(useversion = true) > command = [command(:gemcmd), "install"] > command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? > Symbol) and useversion > # Always include dependencies > command << "--include-dependencies" > > > Thanks, > Matthew > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Reginald Choudari
2013-Feb-25 19:12 UTC
[Puppet Users] Re: Rubygems 2.0.0 removed argument
We are seeing the same issue with our automated deployment of puppetmaster. We are using ''puppetlabs-passenger'' install passenger, and we get the same issue (See below). Looks like the gem provider has deprecated arguments; AFAIK --include-dependencies has become default for gem install. Notice: /File[/etc/httpd/conf.d/ssl.conf]/ensure: removed Notice: /File[/etc/httpd/conf/httpd.conf]/content: content changed ''{md5}fbfc8dde1aa1c1c962792c35ecc99db9'' to ''{md5}ec999e9a079a8fad9e374a8e01df47f4'' Error: Could not update: Execution of ''/usr/bin/gem install -v 3.0.19 --include-dependencies --no-rdoc --no-ri passenger'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) *invalid option: --include-dependencies* Error: /Stage[main]/Passenger/Package[passenger]/ensure: change from absent to 3.0.19 failed: Could not update: Execution of ''/usr/bin/gem install -v 3.0.19 --include-dependencies --no-rdoc --no-ri passenger'' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) * invalid option: --include-dependencies* Notice: /Stage[main]/Passenger/Exec[compile-passenger]: Dependency Package[passenger] has failures: true Warning: /Stage[main]/Passenger/Exec[compile-passenger]: Skipping because of failed dependencies Error: Could not start Service[httpd]: Execution of ''/sbin/service httpd start'' returned 1: Error: /Stage[main]/Apache/Service[httpd]/ensure: change from stopped to running failed: Could not start Service[httpd]: Execution of ''/sbin/service httpd start'' returned 1: Notice: /Stage[main]/Apache/Service[httpd]: Triggered ''refresh'' from 2 events Notice: Finished catalog run in 1.23 seconds On Monday, February 25, 2013 12:31:24 PM UTC-5, matthias wrote:> > I recently upgraded one of our puppet agent servers to use rubygems 2.0.0. > When I run ''puppet agent --test'' after the upgrade it complains that there > is an invalid option with using --include-dependencies switch (output > below). Is there a way to pass arguments to puppet when using gem as the > package installer to use another argument? > > Eg. output > > [root@vm1 ~]# puppet agent --test > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb > Info: Caching catalog for vm1.example.com > Info: Applying configuration version ''1361808741'' > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[bson]/ensure: change from > ["1.8.2", "1.8.1", "1.8.0", "1.7.1", "1.7.0"] to 1.8.2 ruby java failed: > Could not update: Execution of ''/usr/bin/gem install --include-dependencies > --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... > (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[json]/ensure: change from > ["1.7.7"] to 1.7.7 ruby java failed: Could not update: Execution of > ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' > returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Notice: Finished catalog run in 15.45 seconds > > > Somehow it looks hard coded into the gem.rb file > > def install(useversion = true) > command = [command(:gemcmd), "install"] > command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? > Symbol) and useversion > # Always include dependencies > command << "--include-dependencies" > > > Thanks, > Matthew > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Reginald Choudari
2013-Feb-25 19:13 UTC
[Puppet Users] Re: Rubygems 2.0.0 removed argument
We are seeing the same issue with our automated deployment of puppetmaster. We are using ''puppetlabs-passenger'' install passenger, and we get the same issue. Looks like the gem provider has deprecated arguments; AFAIK --include-dependencies has become default for gem install. On Monday, February 25, 2013 12:31:24 PM UTC-5, matthias wrote:> > I recently upgraded one of our puppet agent servers to use rubygems 2.0.0. > When I run ''puppet agent --test'' after the upgrade it complains that there > is an invalid option with using --include-dependencies switch (output > below). Is there a way to pass arguments to puppet when using gem as the > package installer to use another argument? > > Eg. output > > [root@vm1 ~]# puppet agent --test > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb > Info: Caching catalog for vm1.example.com > Info: Applying configuration version ''1361808741'' > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[bson]/ensure: change from > ["1.8.2", "1.8.1", "1.8.0", "1.7.1", "1.7.0"] to 1.8.2 ruby java failed: > Could not update: Execution of ''/usr/bin/gem install --include-dependencies > --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... > (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[json]/ensure: change from > ["1.7.7"] to 1.7.7 ruby java failed: Could not update: Execution of > ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' > returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Notice: Finished catalog run in 15.45 seconds > > > Somehow it looks hard coded into the gem.rb file > > def install(useversion = true) > command = [command(:gemcmd), "install"] > command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? > Symbol) and useversion > # Always include dependencies > command << "--include-dependencies" > > > Thanks, > Matthew > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Is there a fix/workaround/patch for this? On Monday, February 25, 2013 12:31:24 PM UTC-5, matthias wrote:> > I recently upgraded one of our puppet agent servers to use rubygems 2.0.0. > When I run ''puppet agent --test'' after the upgrade it complains that there > is an invalid option with using --include-dependencies switch (output > below). Is there a way to pass arguments to puppet when using gem as the > package installer to use another argument? > > Eg. output > > [root@vm1 ~]# puppet agent --test > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb > Info: Caching catalog for vm1.example.com > Info: Applying configuration version ''1361808741'' > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri bson'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[bson]/ensure: change from > ["1.8.2", "1.8.1", "1.8.0", "1.7.1", "1.7.0"] to 1.8.2 ruby java failed: > Could not update: Execution of ''/usr/bin/gem install --include-dependencies > --no-rdoc --no-ri bson'' returned 1: ERROR: While executing gem ... > (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: Could not update: Execution of ''/usr/bin/gem install > --include-dependencies --no-rdoc --no-ri json'' returned 1: ERROR: While > executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Error: /Stage[main]/Base::Centos6/Package[json]/ensure: change from > ["1.7.7"] to 1.7.7 ruby java failed: Could not update: Execution of > ''/usr/bin/gem install --include-dependencies --no-rdoc --no-ri json'' > returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption) > invalid option: --include-dependencies > > Notice: Finished catalog run in 15.45 seconds > > > Somehow it looks hard coded into the gem.rb file > > def install(useversion = true) > command = [command(:gemcmd), "install"] > command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? > Symbol) and useversion > # Always include dependencies > command << "--include-dependencies" > > > Thanks, > Matthew > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.