Later versions of puppet comes with their own supported ruby included[0]

Any specific reason you are using rvm to run puppet?

[0]
"Starting with Puppet 4, puppet-agent packages do not rely on the OS’s Ruby
version, as it bundles its own Ruby environment. You can install
puppet-agent alongside any version of Ruby or on systems without Ruby
installed. Likewise Puppet Enterprise does not rely on the OS’s Ruby
version, as it bundles its own Ruby environment. You can install PE
alongside any version of Ruby or on systems without Ruby installed.  The
Windows installers provided by Puppet Labs don’t rely on the OS’s Ruby
version, and can be installed alongside any version of Ruby or on systems
without Ruby installed."

https://docs.puppet.com/guides/platforms.html

--
Lowe Schmidt | +46 723 867 157

On 6 January 2017 at 12:02, Steve Button <[email protected]> wrote:

> Hi,
>
> I'm using "sudo puppet apply" to get a bunch of puppet code to run for me,
> but when it runs as root, I notice that the $PATH environment variable is
> showing as :-
>
> Notice: /Stage[main]/Main/Node[ubuntu-xenial]/Exec[/bin/echo
> $PATH]/returns: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/
> bin:/snap/bin
>
> Whereas when I switch to root, I get
>
> root@ubuntu-xenial:~# echo $PATH
>
> /usr/local/rvm/gems/ruby-2.3.0/bin:/usr/local/rvm/gems/ruby-2.3.0@global
> /bin:/usr/local/rvm/rubies/ruby-2.3.0/bin:/usr/local/sbin:/usr/
> local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/rvm/bin
>
> This means that rvm does not work properly, and my Ruby / gem is trying to
> run as 1.9.3 instead of 2.3.0, leading to lots of errors like :-
>
> Debug: Executing '/usr/local/bin/gem list --local'
>
> Warning: Could not match /usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top
> (required)>':
>
>
> Warning: Could not match It seems your ruby installation is missing psych
> (for YAML output).
>
>
> Warning: Could not match To eliminate this warning, please install libyaml
> and reinstall your ruby.
>
> I have tried searching for this error, but haven't found anything yet so I
> was hoping someone in the community could point me in the right direction!?
>
> Many thanks,
>
> Steve Button
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/a82c783e-05f6-451c-9f07-99a46f2e952a%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/a82c783e-05f6-451c-9f07-99a46f2e952a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC-wWcRF9i_Qb2rsLJW9y6efwWMadgRTnLs5DCCRGe%2BA3n00Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to