There're severals things out of your question:
- You should use resource gem_package to install gem for system-wide because
chef_gem
is used for installing gem for dedicated chef usage. see this quote from http://docs.opscode.com/resource_gem_package.html:
Use the chef_gem resource to install gems into the instance of Ruby that is dedicated to the chef-client. Use the gem_package resource to install all other gems (i.e. install gems system-wide).
- install gem (and its dependencies) from other source than
http://rubygems.org/
For example:
gem_package "mysql" do
options("--clear-sources --source http://my.own.local.server/")
action :install
version "2.9.1"
end