Ask Your Question

puppet broken on ruby version

asked 2016-11-15 17:03:43 -0600

johntest gravatar image

updated 2016-11-15 17:47:20 -0600

Here is what happened: I installed puppet 3.8 from this repo

OS: Ubuntu 14.04 Trusty

It was using the standard system version of ruby 1.9

Then I installed ruby2.3 as I need to work with this version for some apps

When I tried to run a puppet module, I got a whole bunch of Evaluation errors. I removed ruby2.3 as I saw its not supported by Puppet 3 or 4. Then I installed ruby2.1. I need at least ruby 2.1 for my app to work and I see this has been tested with Puppet.

However, I keep getting this now

root@server02:~# puppet version
/usr/bin/env: ruby2.3: No such file or directory

root@server02:~# facter
/usr/bin/env: ruby2.3: No such file or directory

So I think I need to somehow change where it is looking for ruby. If not, please advise of solution to this.

UPDATE: I removed everything puppet and ruby related from the system including the files in /usr/local/bin puppet and facter. It seems the installer is not recreating these files. How can I recreate the files?

root@server02:/home/ubuntu# puppet --version
bash: /usr/local/bin/puppet: No such file or directory

UPDATE: Reboot fixed the last issue. Brought the files in /usr/local/bin. Anyone know why? I would prefer to understand what happened here. However getting puppet to work with ruby2.1 is still causing pain. I installed it but now its not finding augeas whereas all the correct augeas packages seem to be installed.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-15 22:00:51 -0600

haus gravatar image

Puppet, facter and hiera from the Puppet repos are all built to use with (and tested against) system ruby. However, as long as your build of ruby 2.1 includes /usr/lib/ruby/vendor_ruby in the load path, puppet and facter should work fine. To see what the load path of your ruby is, try running ruby -e 'puts $LOAD_PATH'.

Augeas however, is only built for ruby 1.9 and ruby 2.0 in ubuntu trusty. In order to get augeas working with ruby 2.1, you will probably need to either build it from source yourself or try gem install ruby-augeas. Here is the list of files in the ruby-augeas package: (as you can see, there are .so files only for the ruby 1.9.1 and 2.0.0 ABI (which correspond to ruby 1.9.3 and ruby 2.0).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-11-15 17:03:43 -0600

Seen: 141 times

Last updated: Nov 15 '16