- From: Mike Adolphs <
- Subject: [chef] Ruby version trouble with rbenv, apache2 and passenger
- Date: Sun, 1 Jul 2012 02:11:21 +0200
I've got a bunch of Debian Squeeze application servers which need
rbenv installed together with Apache2 and passenger. The chef-client
is 10.12.0, comes from Opscode's APT repository and therefore runs
with ruby 1.8. The cookbooks I'm using are
http://fnichol.github.com/chef-rbenv/, the apache2 and
Now the problem is that the passenger gem gets installed in the ruby
1.8 context instead of using the ruby installed by rbenv/ruby_build. I
could fix this with a few actions:
* Making the gem_binary configurable and extending the execute block
which runs passenger-install-apache2-module in the passenger_apache2
* Or using the rbenv_script directive from the rbenv cookbook making
it a dependency for the passenger_apache2 cookbook
I don't like neither of them since both lead to more cookbook
dependencies. On the other hand it seems to be impossible to set
something like `use_rbenv_global_ruby_for_anything` on a global scale
since there's no way to tell a non-interactive shell to source rc
files except patching chef-client itself.
Since ruby and rbenv|rvm are quite popular - how do you solve this?
- Germany -
- [chef] Ruby version trouble with rbenv, apache2 and passenger, Mike Adolphs, 06/30/2012
Archive powered by MHonArc 2.6.16.