Fixing The "Ruby Installation Is Missing Psych" Error

how to solve ruby installation is missing psych error?

In my case

rvm pkg install libyaml

and

rvm reinstall ruby-1.9.3-p125

solved the problem.

For people using Ubuntu, make sure that libtool is installed prior to the steps above:

sudo apt-get install libtool

For macOS users (with homebrew):

rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby

Fixing the ruby installation is missing psych error?

I had same problem after installing ruby 1.9.3 with rvm.
I solve it by downloading yaml-0.1.4.tar.gz into ~/.rvm/archives and then reinstalled ruby again.

cd ~/.rvm/archives
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
rvm reinstall 1.9.3

If you get some compileerrors, try with this instead

rvm reinstall 1.9.3 --with-gcc=clang

Unable to resolve Ruby error (missing psych)

I had this problem and installing libyaml didn't help. It turned out that libyaml-devel was needed by psych. I was on centos6 so I did this:

curl -O http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/atomic-release-1.0-14.el6.art.noarch.rpm

sudo rpm -Uvh atomic-release-1.0-14.el6.art.noarch.rpm

sudo yum install libyaml-devel

rvm reinstall 1.9.3-p194

how to solve ruby installation is missing psych error?

In my case

rvm pkg install libyaml

and

rvm reinstall ruby-1.9.3-p125

solved the problem.

For people using Ubuntu, make sure that libtool is installed prior to the steps above:

sudo apt-get install libtool

For macOS users (with homebrew):

rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby

Ruby missing psych for YAML ouput

I had Ruby 2.5.1 installed from ‘sudo apt install Ruby’ and 2.5.3 installed from RVM. I wiped all installed Rubies and RVM, reinstalled 2.5.3 via RVM on the root directory and was good to go.

how to solve ruby installation is missing psych error?

In my case

rvm pkg install libyaml

and

rvm reinstall ruby-1.9.3-p125

solved the problem.

For people using Ubuntu, make sure that libtool is installed prior to the steps above:

sudo apt-get install libtool

For macOS users (with homebrew):

rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby

How do I fix psych module not being found or being the right version Ruby

Without steps to reproduce the broken system it is hard to say what happened, but I can say in general how you can set this up correctly to use a specific version of Puppet.

Does this help? In the worst case, you can probably uninstall RVM and reinstall it.


Before I continue, let me note that Puppet 4.10.2 and 4.10.3 have both been removed from Rubygems. (Although I was able to install it with PDK.)

For the remainder I assume 4.10.4 instead (just to distinguish it from latest 4.10).


The recommended approach is to use Puppet Development Kit (pdk). If you download and install PDK, you probably just need to do these steps:

pdk convert
rm Gemfile.lock
PUPPET_GEM_VERSION=4.10.4 bundle update # If that version isn't already in PDK.
pdk test unit --puppet-version 4.10.4

If you don't want to go down the PDK path, you can try these alternatives:

  1. Hardcode the version of Puppet you want in Gemfile.
gem 'puppet', '4.10.4'

Or:

gem 'puppet', '~> 4.10' # latest 4.10

Then update your bundle:

rm -f Gemfile.lock
bundle update

  1. Or, you can implement the PUPPET_GEM_VERSION feature by adding this code (this is what I do, for what it's worth):
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion
else
gem 'puppet'
end

And then:

rm -f Gemfile.lock
PUPPET_GEM_VERSION='~> 4.10' bundle update

Now you can run your unit tests against a specific version of Puppet per normal:

bundle exec rake spec

Or however you set it up.



Related Topics



Leave a reply



Submit