[chef] Re: Re: rbenv setup for system wide


Chronological Thread 
  • From: S Ahmed < >
  • To:
  • Subject: [chef] Re: Re: rbenv setup for system wide
  • Date: Sun, 24 Feb 2013 13:10:10 -0500

thanks, looks like I got most of it.

1. How do I set it as global (system wide, not user specific?):
default.rb:

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"

rbenv_ruby "1.9.3-p194"

After my chef-solo ran, I get this when doing:  ruby 

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  1.9.3-p194


2. if I want to install more gems, I have to keep repeating this or like you said put it in a each loop right?

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

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

..
..



On Mon, Feb 18, 2013 at 4:17 PM, AJ Christensen < " target="_blank"> > wrote:
Oh, as for gems: toss 'em in an attribute, map the attribute into
gem_package resources after rbenv is installed and activated so that
gem_package goes to the correct VM.

Cheers,

AJ

On 19 February 2013 10:14, AJ Christensen < "> > wrote:
> Create a cookbook "myorg_system_wide_ruby" and add the rbenv 'related
> code' you mentioned in there.
>
> depends goes into metadata.rb, the rest in a recipe
>
> Cheers,
>
> AJ
>
> On 19 February 2013 10:11, S Ahmed < "> > wrote:
>> 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.

§