I ran into the same issue this weekend, and discovered that the Amazon yum 
repo's latest Puppet package (2.7.25) has ruby1.8 "shebang'd".  With that 
puppet release, you can have ruby2.0 on the system as the default and still 
have puppet running correctly.  If your hosts are running the puppet agent 
as a service, and you haven't restarted them since the 2.0 release (last 
Thursday?), you can even upgrade puppet with a simple:

package { 'puppet': ensure => 'latest' }

YMMV, that worked with the 10 or so hosts I had that were still on puppet < 
2.7.25.

--
M

On Sunday, March 30, 2014 6:03:02 PM UTC-4, Jason Price wrote:
>
> ok.  So for anyone else digging for this issue:
>
> Amazon Linux just did an update to be closer to what RHEL7 will look like, 
> which means they dropped a default install of ruby 1.8.x
>
> The Puppet RPM package is compiled against RHEL5/6 which has ruby 1.8.x.  
> So it drops a ton of its dependencies into /usr/lib/ruby/site_ruby/1.8.
>
> If Ruby 1.8 isn't there, everything is broken.  Fix is to "yum install 
> ruby18 ; alternatives --configure ruby" and set 1.8 as the default ruby.  
> Which is ugly.  Or build your own RPM.
>
> --Jason (yuck)
>
>
> On Sat, Mar 29, 2014 at 10:54 PM, Jason Price <jap...@gmail.com<javascript:>
> > wrote:
>
>> Amazon this week took ruby1.8 out of their Amazon Linux distro.
>>
>> Only ruby2.0 is installed.
>>
>> After installing the puppetlabs yum repo package, and then yum install 
>> puppet, I have this error:
>>
>> # puppet agent -t
>> /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in 
>> `require': cannot load such file -- puppet/util/command_line (LoadError)
>>         from 
>> /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in 
>> `require'
>>         from /usr/bin/puppet:3:in `<main>'
>>
>> If I install ruby18, I can get things working again, but puppet's web 
>> page says ruby 2.0 is perfectly supported.
>>
>> I note that the puppetlabs puppet RPM installs a TON of stuff in 
>> /usr/lib/ruby/site_ruby/1.8 but there's no corresponding 'stuff' for 2.0.  
>> Specifically, the 'command_line' bit certainly is only in the 1.8 path...
>>
>> Any insights would be deeply appreciated.
>>
>> (and yes, I could install 1.8, set alternatives to use 1.8, etc, but I'd 
>> rather not bother)
>>
>> System details:
>>
>> # rpm -qa | grep puppet
>> puppetlabs-release-6-10.noarch
>> puppet-3.4.3-1.el6.noarch
>>
>> # rpm -qa | grep ruby
>> rubygems20-2.0.14-1.14.amzn1.noarch
>> ruby-shadow-1.4.1-15.5.amzn1.x86_64
>> libselinux-ruby-2.1.10-3.17.amzn1.x86_64
>> ruby20-libs-2.0.0.451-1.14.amzn1.x86_64
>> ruby-rgen-0.6.5-2.el6.noarch
>> rubygem20-psych-2.0.0-1.14.amzn1.x86_64
>> rubygem20-rdoc-4.0.1-2.18.amzn1.noarch
>> ruby-2.0-0.3.amzn1.noarch
>> rubygem20-bigdecimal-1.2.0-1.14.amzn1.x86_64
>> ruby-augeas-0.4.1-1.6.amzn1.x86_64
>> rubygem20-json-1.7.7-101.27.amzn1.x86_64
>> ruby20-irb-2.0.0.451-1.14.amzn1.noarch
>> ruby20-2.0.0.451-1.14.amzn1.x86_64
>> ruby18-libs-1.8.7.374-2.42.3.amzn1.x86_64
>> rubygem-json-2.0-0.3.amzn1.noarch
>>
>>  
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20adf55d-ebec-45c7-8755-8bafe55991a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to