[chef] rbenv setup for system wide


Chronological Thread 
  • From: S Ahmed < >
  • To:
  • Subject: [chef] rbenv setup for system wide
  • Date: Mon, 18 Feb 2013 16:11:53 -0500

Thanks to your suggestions, I am going to use rbenv to manage my servers system wide ruby and gems setup.

From the readme it seems to alude to using rbenv as dependancy to a cookbook, but I want to setup a system wide (default) ruby and rubygems.

Does this mean I have to put this in my role_name.rb file?  (I'm using chef-solo).

My current base.rb is:

name 'base'
description 'base role that all nodes will have'
run_list "recipe[build-essential]", "recipe[ohai]", "recipe[runit]", "recipe[yum]", "recipe[openssl]", "recipe[git]", "recipe[apt]", "recipe[java]" 

So do I put rbenv related code in here like:

    depends 'rbenv'
    
    include_recipe "rbenv::default"
    include_recipe "rbenv::ruby_build"

    rbenv_ruby "1.9.3-p194"

    rbenv_gem "bundler" do
      ruby_version "1.9.3-p194"
    end


How can I create a list of gems I want pre-installed for default ruby to be able to access?



Archive powered by MHonArc 2.6.16.

§