This error may occur with some versions of the gem you are installing, but not with others. This is because the YAML error is related to the date
field in the YAML file, as indicated in this comment for error 5581 .
For example, version 1.4.2 of the biographer caused an exception for me.
Instructions on how to get metadata apply to YAML Yak Shave , except that I replaced gunzip and less for gzcat
gem fetch bio --version 1.4.2 tar xvf bio-1.4.2.gem gunzip metadata.gz less metadata | grep date date: 2011-08-26 00:00:00.000000000 Z YAML.load("date: 2011-08-26 00:00:00.000000000 Z")
whereas for version 1.4.1 bio
gem fetch bio --version 1.4.1 tar xvf bio-1.4.1.gem gunzip metadata.gz less metadata | grep date date: 2010-10-22 00:00:00 +09:00 YAML.load("date: 2010-10-22 00:00:00 +09:00")
So sudo jruby -S gem install bio --version 1.4.1
worked for me.
If you want the latest and greatest, you can get the gem, change its metadata or build the gem yourself, but for me it was a good Enough β’.
Andrew Grimm
source share