3

I am trying to make puppet work with augeas but it complains there is no augeas provider. Some googling suggested to

sudo yum install augeas
augtool ls /files/etc/php.ini # test it works as expected
sudo yum install ruby-augeas # this is to "bridge" ruby and augeas
ruby -raugeas -e "puts Augeas.open" # Test ruby can talk to augeas
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- augeas (LoadError)
    from /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

Everything works and installs apart from the last line. Ruby just does not know where to find augeas.rb because it is not in the ruby include path

[vagrant@SubscriptionsAPI ~]$ sudo find / -name "augeas.rb"
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/puppet-3.4.3/lib/puppet/provider/augeas/augeas.rb
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/puppet-3.4.3/lib/puppet/type/augeas.rb
/usr/lib/ruby/site_ruby/1.8/augeas.rb

[vagrant@SubscriptionsAPI ~]$ ruby -e 'puts $:'
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/x86_64-linux
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/vendor_ruby/2.0.0
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/vendor_ruby/2.0.0/x86_64-linux
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/vendor_ruby
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0
/usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-linuxе

Am I correct assuming this is the case? If yes, how can I install augeas for a specific Ruby version? Or is it cleaner to modify the ruby include path?

  • You're mixing up rvm with packages, that is not really a good idea. I suppose you did not install Puppet in RVM, did you? – ℝaphink Sep 1 '15 at 15:12
  • btw, it's "Augeas", not "Augeos" – ℝaphink Sep 1 '15 at 15:12
  • Apologies, I edited the question. I am using a Vagrant base box from a 3rd party - vagrantcloud.com/ginja/boxes/…. It says Puppet was installed using gem – Vladimir Hraban Sep 1 '15 at 15:34
  • @ℝaphink Thanks! You pointed me to the right direction, I had to install a missing augeas-devel package and then install the provider though gem -gem install ruby-augeas. Works like a charm now – Vladimir Hraban Sep 1 '15 at 15:40
2

Packaged ruby libraries and RVM are two separate environments. You cannot mix them like that, you need to choose which one to use.

So you need to either:

  • install the ruby Augeas bindings using packages
  • or install Puppet in RVM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.