I'm using Fedora 18 KDE in VirtualBox, fresh install this morning with full
updates using yum.

I installed puppet by adding the puppet labs yum repo and then "sudo yum
install puppet", so now I'm running puppet version 3.1.1

Running "puppet --version" or "sudo puppet agent --test" gave me the
following error:

*/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot
load such file -- puppet/util/command_line (LoadError)*
* from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require'*
* from /usr/bin/puppet:3:in `<main>'*

As far as I can tell with my limited knowledge of Ruby, Linux and Puppet,
/usr/bin/puppet has a line "require 'puppet/util/command_line'" which
executes via /usr/bin/ruby. The custom_require.rb script (part of ruby)
then looks for a file puppet/util/command_line relative to itself which it
can't find.

Looking at an AWS Linux box where puppet is working, I can see that the
custom_require.rb file is located at
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb, whereas on my
Fedora box the file is located at
/usr/share/rubygems/rubygems/custom_require.rb, the problem is that puppet
has installed it's ruby files in /usr/lib/ruby/site_ruby/1.8, but they
should actually be in /usr/share/rubygems.

The first fix was to add "RUBYLIB=/usr/lib/ruby/site_ruby/1.8" in
/etc/environment and "export RUBYLIB=/usr/lib/ruby/site_ruby/1.8" at the
beginning of /etc/rc.d/init.d/puppet but that felt pretty dirty so now I've
done this:

*sudo mv /usr/lib/ruby/site_ruby/1.8/* /usr/share/rubygems/
*sudo rm -r /usr/lib/ruby/site_ruby/1.8
*sudo ln -s /usr/share/rubygems /usr/lib/ruby/site_ruby/1.8*

If anyone has a better solution I'm all ears, ideally I'd like to just use
yum for puppet and any of it's dependencies, tweak the puppet.conf file and
everything work (like it does in EC2, etc), Do I have to install another
version of ruby?? Or set an environment variable before installing puppet
so it knows where to put the files?? Maybe it's just Fedora's weird ruby
install process?

Here's a yum list just in case:

$ sudo yum list installed | grep ruby
libselinux-ruby.x86_64 2.1.12-7.3.fc18 @updates

ruby.x86_64 @updates

ruby-augeas.x86_64 0.4.1-4.fc18 @fedora

ruby-irb.noarch @updates

ruby-libs.x86_64 @updates

ruby-shadow.x86_64 1.4.1-17.fc18 @fedora

rubygem-bigdecimal.x86_64 1.1.0-29.fc18 @updates

rubygem-io-console.x86_64 0.3-29.fc18 @updates

rubygem-json.x86_64 1.6.8-1.fc18 @updates

rubygem-rdoc.noarch 3.12-6.fc18 @updates

rubygems.noarch 1.8.25-6.fc18 @updates

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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 11 | next ›
Discussion Overview
grouppuppet-users @
postedMay 16, '13 at 11:22p
activeMay 22, '13 at 2:19a



site design / logo © 2022 Grokbase