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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a82c783e-05f6-451c-9f07-99a46f2e952a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.