we are trying to use database cookbook, but our node is behind a proxy
and we cannot manage how to force chef to use gem with proxy setup.
As written here:
“The providers use specific Ruby gems installed under Chef’s Ruby
environment to execute commands and carry out actions. These gems will
need to be installed before the providers can operate correctly.
PostgreSQL: leverages the pg gem which is installed as part of the
postgresql::ruby recipe. You can use database::postgresql to include
As you can see, here is the error that breaks chef run (confirmed by netstat):
MYNODE_LOG Recipe: postgresql::ruby
MYNODE_LOG * chef_gem[pg] action install
MYNODE_LOG [2013-05-06T17:16:45+02:00] INFO: Processing chef_gem[pg]
action install (postgresql::ruby line 40)
MYNODE_LOG WARNING: Error fetching data: Errno::ETIMEDOUT: Connection
timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
We also tried setting up /etc/gemrc in this way:
and, while it woks calling gem directly, it is ignored during chef run.
Any help would be appreciated