I am trying to install a global version of ruby that other chef recipes will recognize as the system ruby. I am attempting to do this with chef-rbenv which seems to work on a user level but does not work when chef runs ohai. I say it doesn't work when chef runs ohai because cookbooks like passenger_apache2 reference node['languages']['ruby']['ruby_bin']
which points to "/usr/bin/ruby". However when I run ohai logged in as a user I get the rbenv shim location. Am I missing something in my rbenv configuration to see this behavior?
Additional Info:
Platform - amazon (ami-05355a6c)
run_list:
recipe[ruby_build]
recipe[ohai]
recipe[rbenv::system]
recipe[build-essential]
recipe[apache2]
recipe[passenger_apache2]
recipe[passenger_apache2::mod_rails]
--UPDATE
I never got the chef-client ohai to pick up my rbenv settings but this is no longer a problem because I ended up overriding the node attributes in a role. This was only possible due to a recent change (passenger_apache2 commit -a0a32fda0b56228d6e54163c98f6736e17cad12c).
Note: omnibus would likely have solved my problems too.