Error while install di-ruby-lvm gem


#1

Hi,

I am trying to use lvm cookbook. In my environment i do not have internet and i am using gem_package in my wrapper cookbook to install gems. I am trying to use below code, in this it is trying to check package locally but dependent packages are still looked in internet url.

gem_package ‘di-ruby-lvm’ do
source "/home/scripts/#{File.basename(node[‘EBSMount’][‘lvm_url’])}"
clear_sources true
action :install
end

gem_package[di-ruby-lvm] (EBSMount::default line 42) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘2’
---- Begin output of /opt/chef/embedded/bin/gem install /home/scripts/di-ruby-lvm-0.2.1.gem -q --no-rdoc --no-ri -v “0.2.1” ----
STDOUT:
STDERR: ERROR: Could not find a valid gem ‘open4’ (>= 0.9.6, ~> 0.9), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for “api.rubygems.org” port 443 (https://api.rubygems.org/specs.4.8.gz)


Lvm cookbook "cannot load such file -- lvm"
#2

As the error indicates, it is trying install the open4 gem as a dependency and cannot. Install that first.


#3

It has been installed already but still it is giving error. My complete code is below

gem_package ‘open4’ do
action :install
source "/home/scripts/#{File.basename(node[‘EBSMount’][‘open4_url’])}"
clear_sources true

end    
gem_package 'di-ruby-lvm' do
    source "/home/scripts/#{File.basename(node['EBSMount']['lvm_url'])}"
    clear_sources true
    action :install
    end