I’m currently following the ruby gems installation for ubuntu. We’re using
this rather than the apt method as some of the gems we require appear to
need a newer version of rubygems than the ubuntu package.
So my install procedure is pretty much this:
sudo -E apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb
build-essential wget ssl-cert curl
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
sudo -E ruby setup.rb --no-format-executable
sudo -E gem install chef --no-ri --no-rdoc
sudo -E gem install aws-sdk pony --no-ri --no-rdoc
I then register my node with my chef server and that’s fine.
As soon as I add my recipe into the node’s runlist and sudo chef-client
FATAL: LoadError: no such file to lead – aws-sdk
However, if I do this:
I can then sudo chef-client and the aws-sdk gem is loaded.
So there’s several questions:
- Have I missed something which is breaking the GEM_PATH?
- Where should I set GEM_PATH so it’s seen by chef-client during a manual
run and as a daemon?
Ideally we would just bootstrap, and we are going to do that, but I’d
still like to know where the issue lies.