New LVM ruby gem breaks LVM cookbook


#1

I’m using the LVM cookbook, which relies on the di-ruby-lvm. It seems that
this gem’s version in ruby gems repository was updated from 0.1.3 to 0.2.0
overnight. This is causing the LVM cookbook to fail on calls
to lvm_volume_group resource with the error “undefined method `list’ for
:LVM::PhysicalVolumes”.

I guess either the author needs to fix the lvm cookbook to make it work
with the new gem, or I have to pin it somehow. I guess the only real way I
can do this without modifying the cookbook would be to install a specific
version of the gem first in the recipe before including the lvm cookbook?
Is there a better way?

Doug


#2

According to the cookbook, there’s an attribute for the gem version that you can set:

node['lvm']['di-ruby-lvm']['version']

I’m guessing if you set that attribute to 0.1.3, you’d be all set. As always, your mileage may vary / please do it in non-production first :slight_smile: