Lvm cookbook "cannot load such file -- lvm"

Hi all,

I’m trying to use the ‘lvm’ cookbook for the first time:
LoadError
---------
cannot load such file – lvm

Cookbook Trace:
---------------

/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:44:in
`action_create’

I thought this would have something to do with the di-ruby-lvm gem not
being installed but now my recipe is installing di-ruby-lvm &
di-ruby-lvm-attrib before the lvm_volume_group block so I would expect it
would be able to pull in this gem when it does the “require ‘lvm’”.

Is there something simple I’m missing here?

Thanks!

Are you using the chef_gem package provider to install di-ruby-lvm?

If this doesn't solve your problem, please Gist https://gist.github.com or
Pastebin http://pastebin.com/ your recipe for easier debugging.

Ringo

On 16 March 2015 at 09:39, Cooper Simmons cooper.simmons@gmail.com wrote:

Hi all,

I'm trying to use the 'lvm' cookbook for the first time:
LoadError
---------
cannot load such file -- lvm

Cookbook Trace:
---------------

/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:44:in
`action_create'

I thought this would have something to do with the di-ruby-lvm gem not
being installed but now my recipe is installing di-ruby-lvm &
di-ruby-lvm-attrib before the lvm_volume_group block so I would expect it
would be able to pull in this gem when it does the "require 'lvm'".

Is there something simple I'm missing here?

Thanks!

Ringo, thank you!
I had not installed gems for Chef's use before and did not know the
distinction between gem_package & chef_gem. That fixed it.
Thanks again,
Cooper

On Mon, Mar 16, 2015 at 2:35 PM, Ringo De Smet ringo.desmet@gmail.com
wrote:

Are you using the chef_gem package provider to install di-ruby-lvm?

If this doesn't solve your problem, please Gist https://gist.github.com or
Pastebin http://pastebin.com/ your recipe for easier debugging.

Ringo

On 16 March 2015 at 09:39, Cooper Simmons cooper.simmons@gmail.com
wrote:

Hi all,

I'm trying to use the 'lvm' cookbook for the first time:
LoadError
---------
cannot load such file -- lvm

Cookbook Trace:
---------------

/var/chef/cache/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:44:in
`action_create'

I thought this would have something to do with the di-ruby-lvm gem not
being installed but now my recipe is installing di-ruby-lvm &
di-ruby-lvm-attrib before the lvm_volume_group block so I would expect it
would be able to pull in this gem when it does the "require 'lvm'".

Is there something simple I'm missing here?

Thanks!

A post was split to a new topic: Error while install di-ruby-lvm gem