Folks,
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.
http://wiki.opscode.com/display/chef/Installing+Chef+Client+on+Ubuntu+or+Debian#InstallingChefClientonUbuntuorDebian-Rubygem
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
cd /tmp
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
cd rubygems-1.8.10
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
this happens
FATAL: LoadError: no such file to lead – aws-sdk
However, if I do this:
export GEM_PATH=/usr/lib/ruby/gems/1.8
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.
TIA
Luke
On Tue, Mar 13, 2012 at 9:34 AM, Luke Biddell luke.biddell@gmail.com wrote:
- Have I missed something which is breaking the GEM_PATH?
Is/was Rubygems installed using the distro packaging as well?
dpkg -l rubygems rubygems1.8
Bryan
No it wasn't. I'd removed it but perhaps I didn't purge it?
I've rifled up a brand new vbox and it's fine. Must have been residual
config.
On 13 March 2012 20:54, Bryan McLellan btm@loftninjas.org wrote:
On Tue, Mar 13, 2012 at 9:34 AM, Luke Biddell luke.biddell@gmail.com
wrote:
- Have I missed something which is breaking the GEM_PATH?
Is/was Rubygems installed using the distro packaging as well?
dpkg -l rubygems rubygems1.8
Bryan
On Thu, Mar 15, 2012 at 9:11 AM, Luke Biddell luke.biddell@gmail.com wrote:
No it wasn't. I'd removed it but perhaps I didn't purge it?
I've rifled up a brand new vbox and it's fine. Must have been residual
config.
Yeah, unfortunately the Ruby community has developed a lot of
different opinions on how Ruby and libraries should be installed. The
more of these that you've tried on one system the more ghosts get left
behind.
Bryan
Yeah, I see that now - gone from jar hell to gem hell
Thanks for the help.
On 15 March 2012 16:43, Bryan McLellan btm@loftninjas.org wrote:
On Thu, Mar 15, 2012 at 9:11 AM, Luke Biddell luke.biddell@gmail.com
wrote:
No it wasn't. I'd removed it but perhaps I didn't purge it?
I've rifled up a brand new vbox and it's fine. Must have been residual
config.
Yeah, unfortunately the Ruby community has developed a lot of
different opinions on how Ruby and libraries should be installed. The
more of these that you've tried on one system the more ghosts get left
behind.
Bryan