I seeing a similar behavior - Also to the other post on chef_gem with the minitest-handler
At first run, this fails complaining it can't install the chef_gem.
On second run this works correctly.
On 06/02/13 23:08,
wrote:
I just upgraded from running 0.10.8 with ruby 1.8.7 installed on the system to
the omnibus 10.18.2. I have a recipe running chef_gem to install a gem and chef
can see that the gem is not in the omnibus rubygems, so it installs it. But it
installs it into the system rubygems. Even if I run chef-client again it sees
the gem is not in omnibus and then installs it in the system. If I remove
/usr/bin/gem then chef will install it inside omnibus. I thought chef_gem was
supposed to ignore /usr/bin/gem. Has anyone seen this, or know how to work
around it, or know what I may be doing wrong?
I'm running Centos 5.4 as root with
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root]# gem list netaddr
*** LOCAL GEMS ***
[root]# /opt/chef/embedded/bin/gem list netaddr
*** LOCAL GEMS ***
[root]# chef-client -l debug
...
[2013-02-06T21:01:41+00:00] INFO: Processing chef_gem[netaddr] action install
(cookbook::recipe line 2)
[2013-02-06T21:01:41+00:00] DEBUG: chef_gem[netaddr] detected omnibus
installation in /opt/chef/embedded/bin
[2013-02-06T21:01:41+00:00] DEBUG: chef_gem[netaddr] using gem from running
ruby environment
[2013-02-06T21:01:41+00:00] DEBUG: chef_gem[netaddr] no installed version found
for netaddr (>= 0)
[2013-02-06T21:01:43+00:00] DEBUG: found gem netaddr version 1.5.0 for
platform ruby from http://rubygems.org/
Successfully installed netaddr-1.5.0
1 gem installed
...
[root]# gem list netaddr
*** LOCAL GEMS ***
netaddr (1.5.0)
[root]# /opt/chef/embedded/bin/gem list netaddr
*** LOCAL GEMS ***
[root]#
Thanks,
Dan
Archive powered by MHonArc 2.6.16.