# Installing Ruby from source

**URL:** <https://discourse.chef.io/t/installing-ruby-from-source/3975>\
**Category:** Chef Infra (archive)\
**Created:** [May 20, 2013, 8:41am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975 "2013-05-20T08:41:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffrey\_Jones](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jeffrey\_Jones](https://discourse.chef.io/u/Jeffrey_Jones)\
**Post date:** [May 20, 2013, 8:41am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/1 "2013-05-20T08:41:45Z")

</div>

Hello all.

I have decided that one of chef’s greatest strengths; and biggest  
weaknesses is the community cookbooks (but that is a post for another time).

Is there any “canonical” cookbook that will install ruby (version of our  
choosing) from source (Including the build-essential’ish packages)? I  
have found half a dozen ruby cookbooks but none of them offer the source  
option (I did actually find one but it is 2 years old, barely documented  
and released under the WTFPL)

I am pretty surprised that I could not find one “opscode” blessed  
"Install ruby from source" cookbook, seems like a pretty basic building  
block.

On a slight return to my first line, the community cookbook page really  
REALLY needs some sorting and filtering features.

Cheers

Jeff

---

<div class="post-metadata">

**Author:** ![Prajwal\_Manjunath](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Prajwal\_Manjunath](https://discourse.chef.io/u/Prajwal_Manjunath)\
**Post date:** [May 20, 2013, 8:45am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/2 "2013-05-20T08:45:46Z")

</div>

There's the ruby-build cookbook. I've been using it on Ubuntu and CentOS  
without issues.

On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:

> Hello all.
> 
> I have decided that one of chef's greatest strengths; and biggest  
> weaknesses is the community cookbooks (but that is a post for another time).
> 
> Is there any "canonical" cookbook that will install ruby (version of our  
> choosing) from source (Including the build-essential'ish packages)? I have  
> found half a dozen ruby cookbooks but none of them offer the source option  
> (I did actually find one but it is 2 years old, barely documented and  
> released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed "Install  
> ruby from source" cookbook, seems like a pretty basic building block.
> 
> On a slight return to my first line, the community cookbook page really  
> REALLY needs some sorting and filtering features.
> 
> Cheers
> 
> Jeff

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Jones](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jeffrey\_Jones](https://discourse.chef.io/u/Jeffrey_Jones)\
**Post date:** [May 20, 2013, 8:48am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/3 "2013-05-20T08:48:21Z")

</div>

Ruby build uses rbenv from what I can see which is a no-no I am afraid.

On 20/05/13 17:45, Prajwal Manjunath wrote:

> There's the ruby-build cookbook. I've been using it on Ubuntu and  
> CentOS without issues.
> 
> On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones \<jjones@toppan-f.co.jp  
> [mailto:jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)\> wrote:
> 
> ```
> Hello all.
> 
> I have decided that one of chef's greatest strengths; and biggest
> weaknesses is the community cookbooks (but that is a post for
> another time).
> 
> Is there any "canonical" cookbook that will install ruby (version
> of our choosing) from source (Including the build-essential'ish
> packages)? I have found half a dozen ruby cookbooks but none of
> them offer the source option (I did actually find one but it is 2
> years old, barely documented and released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed
> "Install ruby from source" cookbook, seems like a pretty basic
> building block.
> 
> On a slight return to my first line, the community cookbook page
> really REALLY needs some sorting and filtering features.
> 
> Cheers
> 
> Jeff
> 
> ```

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [May 20, 2013, 8:49am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/4 "2013-05-20T08:49:34Z")

</div>

Here u go.

> **[GitHub - sous-chefs/ruby\_rbenv: Development repository for the ruby\_rbenv...](https://github.com/sous-chefs/ruby_rbenv)**
>
> Development repository for the ruby\_rbenv cookbook - GitHub - sous-chefs/ruby\_rbenv: Development repository for the ruby\_rbenv cookbook

Install any version of ruby as many as u want.

On Monday, May 20, 2013, Prajwal Manjunath wrote:

> There's the ruby-build cookbook. I've been using it on Ubuntu and CentOS  
> without issues.
> 
> On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones \<jjones@toppan-f.co.jp\<javascript:\_e({}, 'cvml', 'jjones@toppan-f.co.jp');\>
> 
> > wrote:
> 
> > Hello all.
> > 
> > I have decided that one of chef's greatest strengths; and biggest  
> > weaknesses is the community cookbooks (but that is a post for another time).
> > 
> > Is there any "canonical" cookbook that will install ruby (version of our  
> > choosing) from source (Including the build-essential'ish packages)? I have  
> > found half a dozen ruby cookbooks but none of them offer the source option  
> > (I did actually find one but it is 2 years old, barely documented and  
> > released under the WTFPL)
> > 
> > I am pretty surprised that I could not find one "opscode" blessed  
> > "Install ruby from source" cookbook, seems like a pretty basic building  
> > block.
> > 
> > On a slight return to my first line, the community cookbook page really  
> > REALLY needs some sorting and filtering features.
> > 
> > Cheers
> > 
> > Jeff

--  
Sent from Millisami'z iPad mini

---

<div class="post-metadata">

**Author:** ![Morgan\_Blackthorne](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/morgan_blackthorne/32/100_2.png) [@Morgan\_Blackthorne](https://discourse.chef.io/u/Morgan_Blackthorne)\
**Post date:** [May 20, 2013, 8:49am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/5 "2013-05-20T08:49:51Z")

</div>

Could you elaborate a bit more on the why behind this statement, which  
might help folks understand your goals a bit better?

--  
~_~ StormeRider ~_~

"Every world needs its heroes [...] They inspire us to be better than we  
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)

On Mon, May 20, 2013 at 1:48 AM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:

> Ruby build uses rbenv from what I can see which is a no-no I am afraid.
> 
> On 20/05/13 17:45, Prajwal Manjunath wrote:
> 
> There's the ruby-build cookbook. I've been using it on Ubuntu and CentOS  
> without issues.
> 
> On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:
> 
> > Hello all.
> > 
> > I have decided that one of chef's greatest strengths; and biggest  
> > weaknesses is the community cookbooks (but that is a post for another time).
> > 
> > Is there any "canonical" cookbook that will install ruby (version of our  
> > choosing) from source (Including the build-essential'ish packages)? I have  
> > found half a dozen ruby cookbooks but none of them offer the source option  
> > (I did actually find one but it is 2 years old, barely documented and  
> > released under the WTFPL)
> > 
> > I am pretty surprised that I could not find one "opscode" blessed  
> > "Install ruby from source" cookbook, seems like a pretty basic building  
> > block.
> > 
> > On a slight return to my first line, the community cookbook page really  
> > REALLY needs some sorting and filtering features.
> > 
> > Cheers
> > 
> > Jeff

---

<div class="post-metadata">

**Author:** ![Prajwal\_Manjunath](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Prajwal\_Manjunath](https://discourse.chef.io/u/Prajwal_Manjunath)\
**Post date:** [May 20, 2013, 8:52am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/6 "2013-05-20T08:52:50Z")

</div>

No, ruby-build CAN be built as a rbenv plugin, but the cookbook doesn't do  
that, rather it works as a standalone. It essentialy compiles a fresh copy  
of ruby in a directory of your choosing and leaves it at that. I then link  
them to /usr/bin/(ruby|gem) and I'm done. Everything in my machine now sees  
a single version of ruby. We make it a point to not have any sort of ruby  
versioning in production either.

On Mon, May 20, 2013 at 2:19 PM, Morgan Blackthorne  
[stormerider@gmail.com](mailto:stormerider@gmail.com)wrote:

> Could you elaborate a bit more on the why behind this statement, which  
> might help folks understand your goals a bit better?
> 
> --  
> ~_~ StormeRider ~_~
> 
> "Every world needs its heroes [...] They inspire us to be better than we  
> are. And they protect from the darkness that's just around the corner."
> 
> (from Smallville Season 6x1: "Zod")
> 
> On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)
> 
> On Mon, May 20, 2013 at 1:48 AM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:
> 
> > Ruby build uses rbenv from what I can see which is a no-no I am afraid.
> > 
> > On 20/05/13 17:45, Prajwal Manjunath wrote:
> > 
> > There's the ruby-build cookbook. I've been using it on Ubuntu and CentOS  
> > without issues.
> > 
> > On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:
> > 
> > > Hello all.
> > > 
> > > I have decided that one of chef's greatest strengths; and biggest  
> > > weaknesses is the community cookbooks (but that is a post for another time).
> > > 
> > > Is there any "canonical" cookbook that will install ruby (version of our  
> > > choosing) from source (Including the build-essential'ish packages)? I have  
> > > found half a dozen ruby cookbooks but none of them offer the source option  
> > > (I did actually find one but it is 2 years old, barely documented and  
> > > released under the WTFPL)
> > > 
> > > I am pretty surprised that I could not find one "opscode" blessed  
> > > "Install ruby from source" cookbook, seems like a pretty basic building  
> > > block.
> > > 
> > > On a slight return to my first line, the community cookbook page really  
> > > REALLY needs some sorting and filtering features.
> > > 
> > > Cheers
> > > 
> > > Jeff

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Jones](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jeffrey\_Jones](https://discourse.chef.io/u/Jeffrey_Jones)\
**Post date:** [May 20, 2013, 8:54am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/7 "2013-05-20T08:54:43Z")

</div>

To have as few moving parts as possible, RVM, rbenv etc. is not desired.

Therefore I am looking for a cookbook that literally just installs ruby  
from source.

Install support packages (gcc, readline, libyaml etc.)  
download  
compile  
make  
make install.

Not a huge amount of work but if it already exists I would prefer not to  
reinvent the wheel.

On 20/05/13 17:49, Morgan Blackthorne wrote:

> Could you elaborate a bit more on the why behind this statement, which  
> might help folks understand your goals a bit better?
> 
> --  
> ~_~ StormeRider ~_~
> 
> "Every world needs its heroes [...] They inspire us to be better than  
> we are. And they protect from the darkness that's just around the corner."
> 
> (from Smallville Season 6x1: "Zod")
> 
> On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)
> 
> On Mon, May 20, 2013 at 1:48 AM, Jeffrey Jones \<jjones@toppan-f.co.jp  
> [mailto:jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)\> wrote:
> 
> ```
> Ruby build uses rbenv from what I can see which is a no-no I am
> afraid.
> 
> On 20/05/13 17:45, Prajwal Manjunath wrote:
> 
> ```
> 
> > ```
> > There's the ruby-build cookbook. I've been using it on Ubuntu and
> > CentOS without issues.
> > 
> > On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones
> > <jjones@toppan-f.co.jp <mailto:jjones@toppan-f.co.jp>> wrote:
> > 
> > Hello all.
> > 
> > I have decided that one of chef's greatest strengths; and
> > biggest weaknesses is the community cookbooks (but that is a
> > post for another time).
> > 
> > Is there any "canonical" cookbook that will install ruby
> > (version of our choosing) from source (Including the
> > build-essential'ish packages)? I have found half a dozen ruby
> > cookbooks but none of them offer the source option (I did
> > actually find one but it is 2 years old, barely documented
> > and released under the WTFPL)
> > 
> > I am pretty surprised that I could not find one "opscode"
> > blessed "Install ruby from source" cookbook, seems like a
> > pretty basic building block.
> > 
> > On a slight return to my first line, the community cookbook
> > page really REALLY needs some sorting and filtering features.
> > 
> > Cheers
> > 
> > Jeff
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Jones](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jeffrey\_Jones](https://discourse.chef.io/u/Jeffrey_Jones)\
**Post date:** [May 20, 2013, 8:56am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/8 "2013-05-20T08:56:08Z")

</div>

Actually, my previous email said this looks like it uses rbenv, having  
looked at it again, I think I am wrong.

I must have got it mixed up with another one of the ruby options. I  
shall have a look at this one, thanks.

On 20/05/13 17:45, Prajwal Manjunath wrote:

> There's the ruby-build cookbook. I've been using it on Ubuntu and  
> CentOS without issues.
> 
> On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones \<jjones@toppan-f.co.jp  
> [mailto:jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)\> wrote:
> 
> ```
> Hello all.
> 
> I have decided that one of chef's greatest strengths; and biggest
> weaknesses is the community cookbooks (but that is a post for
> another time).
> 
> Is there any "canonical" cookbook that will install ruby (version
> of our choosing) from source (Including the build-essential'ish
> packages)? I have found half a dozen ruby cookbooks but none of
> them offer the source option (I did actually find one but it is 2
> years old, barely documented and released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed
> "Install ruby from source" cookbook, seems like a pretty basic
> building block.
> 
> On a slight return to my first line, the community cookbook page
> really REALLY needs some sorting and filtering features.
> 
> Cheers
> 
> Jeff
> 
> ```

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Jones](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Jeffrey\_Jones](https://discourse.chef.io/u/Jeffrey_Jones)\
**Post date:** [May 20, 2013, 8:58am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/9 "2013-05-20T08:58:40Z")

</div>

Thanks for that, I must have gotten that cookbook mixed up with another  
one.

I shall look into it further.

On 20/05/13 17:52, Prajwal Manjunath wrote:

> No, ruby-build CAN be built as a rbenv plugin, but the cookbook  
> doesn't do that, rather it works as a standalone. It essentialy  
> compiles a fresh copy of ruby in a directory of your choosing and  
> leaves it at that. I then link them to /usr/bin/(ruby|gem) and I'm  
> done. Everything in my machine now sees a single version of ruby. We  
> make it a point to not have any sort of ruby versioning in production  
> either.
> 
> On Mon, May 20, 2013 at 2:19 PM, Morgan Blackthorne  
> \<[stormerider@gmail.com](mailto:stormerider@gmail.com) [mailto:stormerider@gmail.com](mailto:stormerider@gmail.com)\> wrote:
> 
> ```
> Could you elaborate a bit more on the why behind this statement,
> which might help folks understand your goals a bit better?
> 
> -- 
> ~*~ StormeRider ~*~
> 
> "Every world needs its heroes [...] They inspire us to be better
> than we are. And they protect from the darkness that's just around
> the corner."
> 
> (from Smallville Season 6x1: "Zod")
> 
> On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS
> 
> On Mon, May 20, 2013 at 1:48 AM, Jeffrey Jones
> <jjones@toppan-f.co.jp <mailto:jjones@toppan-f.co.jp>> wrote:
> 
> Ruby build uses rbenv from what I can see which is a no-no I
> am afraid.
> 
> On 20/05/13 17:45, Prajwal Manjunath wrote:
> 
> ```
> 
> > ```
> > There's the ruby-build cookbook. I've been using it on Ubuntu
> > and CentOS without issues.
> > 
> > On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones
> > <jjones@toppan-f.co.jp <mailto:jjones@toppan-f.co.jp>> wrote:
> > 
> > Hello all.
> > 
> > I have decided that one of chef's greatest strengths; and
> > biggest weaknesses is the community cookbooks (but that
> > is a post for another time).
> > 
> > Is there any "canonical" cookbook that will install ruby
> > (version of our choosing) from source (Including the
> > build-essential'ish packages)? I have found half a dozen
> > ruby cookbooks but none of them offer the source option
> > (I did actually find one but it is 2 years old, barely
> > documented and released under the WTFPL)
> > 
> > I am pretty surprised that I could not find one "opscode"
> > blessed "Install ruby from source" cookbook, seems like a
> > pretty basic building block.
> > 
> > On a slight return to my first line, the community
> > cookbook page really REALLY needs some sorting and
> > filtering features.
> > 
> > Cheers
> > 
> > Jeff
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![Angus\_Buchanan](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Angus\_Buchanan](https://discourse.chef.io/u/Angus_Buchanan)\
**Post date:** [May 20, 2013, 11:29am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/10 "2013-05-20T11:29:21Z")

</div>

I've gone from rvm to rbenv to chruby. A chruby cookbook was recently  
released, which I am now using:

[http://community.opscode.com/cookbooks/chruby](http://community.opscode.com/cookbooks/chruby)

It uses ruby-build (which just builds Ruby) and then chruby to manage  
versions

-aob

On Mon, May 20, 2013 at 9:58 AM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:

> Thanks for that, I must have gotten that cookbook mixed up with another  
> one.
> 
> I shall look into it further.
> 
> On 20/05/13 17:52, Prajwal Manjunath wrote:
> 
> No, ruby-build CAN be built as a rbenv plugin, but the cookbook doesn't do  
> that, rather it works as a standalone. It essentialy compiles a fresh copy  
> of ruby in a directory of your choosing and leaves it at that. I then link  
> them to /usr/bin/(ruby|gem) and I'm done. Everything in my machine now sees  
> a single version of ruby. We make it a point to not have any sort of ruby  
> versioning in production either.
> 
> On Mon, May 20, 2013 at 2:19 PM, Morgan Blackthorne \<[stormerider@gmail.com](mailto:stormerider@gmail.com)
> 
> > wrote:
> 
> > Could you elaborate a bit more on the why behind this statement, which  
> > might help folks understand your goals a bit better?
> > 
> > --  
> > ~_~ StormeRider ~_~
> > 
> > "Every world needs its heroes [...] They inspire us to be better than we  
> > are. And they protect from the darkness that's just around the corner."
> > 
> > (from Smallville Season 6x1: "Zod")
> > 
> > On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)
> > 
> > On Mon, May 20, 2013 at 1:48 AM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:
> > 
> > > Ruby build uses rbenv from what I can see which is a no-no I am afraid.
> > > 
> > > On 20/05/13 17:45, Prajwal Manjunath wrote:
> > > 
> > > There's the ruby-build cookbook. I've been using it on Ubuntu and CentOS  
> > > without issues.
> > > 
> > > On Mon, May 20, 2013 at 2:11 PM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp)wrote:
> > > 
> > > > Hello all.
> > > > 
> > > > I have decided that one of chef's greatest strengths; and biggest  
> > > > weaknesses is the community cookbooks (but that is a post for another time).
> > > > 
> > > > Is there any "canonical" cookbook that will install ruby (version of  
> > > > our choosing) from source (Including the build-essential'ish packages)? I  
> > > > have found half a dozen ruby cookbooks but none of them offer the source  
> > > > option (I did actually find one but it is 2 years old, barely documented  
> > > > and released under the WTFPL)
> > > > 
> > > > I am pretty surprised that I could not find one "opscode" blessed  
> > > > "Install ruby from source" cookbook, seems like a pretty basic building  
> > > > block.
> > > > 
> > > > On a slight return to my first line, the community cookbook page really  
> > > > REALLY needs some sorting and filtering features.
> > > > 
> > > > Cheers
> > > > 
> > > > Jeff

---

<div class="post-metadata">

**Author:** ![Sascha\_Bates](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sascha_bates/32/504_2.png) [@Sascha\_Bates](https://discourse.chef.io/u/Sascha_Bates)\
**Post date:** [May 20, 2013, 3:31pm UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/11 "2013-05-20T15:31:55Z")

</div>

Are you looking for this for workstation development or server  
provisioning?

If the latter, I always make a package for my OS package manager and  
then place it in an internal repo. Generally that's Red Hat and I use  
Ian Meyer's spec to compile it on a dev server:  
[GitHub - imeyer/ruby-1.9.3-rpm: RPM spec for Ruby 1.9.3](https://github.com/imeyer/ruby-1.9.3-rpm). If Ubuntu, they actually have  
a Ruby1.9 package set.

If you are looking for workstation provisioning for OSX, the topic is  
complex because OSX already ships with a system Ruby, which is why  
everyone is suggesting a Ruby manager. If you don't want one, you can  
look at Seth Chisamore's omnibus-chef-utensils which will build an  
omnibus version of a ruby-chef-development toolchain:

> **[GitHub - schisamo/omnibus-chef-utensils: A self-contained, full-stack...](https://github.com/schisamo/omnibus-chef-utensils)**
>
> A self-contained, full-stack cookbook development toolchain for Chef! - GitHub - schisamo/omnibus-chef-utensils: A self-contained, full-stack cookbook development toolchain for Chef!

Sascha

Jeffrey Jones wrote:

> Hello all.
> 
> I have decided that one of chef's greatest strengths; and biggest  
> weaknesses is the community cookbooks (but that is a post for another  
> time).
> 
> Is there any "canonical" cookbook that will install ruby (version of  
> our choosing) from source (Including the build-essential'ish  
> packages)? I have found half a dozen ruby cookbooks but none of them  
> offer the source option (I did actually find one but it is 2 years  
> old, barely documented and released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed  
> "Install ruby from source" cookbook, seems like a pretty basic  
> building block.
> 
> On a slight return to my first line, the community cookbook page  
> really REALLY needs some sorting and filtering features.
> 
> Cheers
> 
> Jeff

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [May 20, 2013, 3:50pm UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/12 "2013-05-20T15:50:36Z")

</div>

"canonical".

No such thing, in any software, packaging, etc.

There's only "this seems to work for me, I'm going to test it out, and  
if it works, awesome."

This is the case for pretty much any package, anywhere.

Since many community cookbooks are named after a particular  
product/package, there may be an assumption that the "redis" cookbook  
is the canonical one, but there's also "rediso", "redis2",  
"redis-package" and others not on the site.

So there's no canonical anything, only things that you can grok and work well.

My 2 cents,  
-M

On Mon, May 20, 2013 at 11:31 AM, Sascha Bates [sascha.bates@gmail.com](mailto:sascha.bates@gmail.com) wrote:

> Are you looking for this for workstation development or server provisioning?
> 
> If the latter, I always make a package for my OS package manager and then  
> place it in an internal repo. Generally that's Red Hat and I use Ian  
> Meyer's spec to compile it on a dev server:  
> [GitHub - imeyer/ruby-1.9.3-rpm: RPM spec for Ruby 1.9.3](https://github.com/imeyer/ruby-1.9.3-rpm). If Ubuntu, they actually have a  
> Ruby1.9 package set.
> 
> If you are looking for workstation provisioning for OSX, the topic is  
> complex because OSX already ships with a system Ruby, which is why everyone  
> is suggesting a Ruby manager. If you don't want one, you can look at Seth  
> Chisamore's omnibus-chef-utensils which will build an omnibus version of a  
> ruby-chef-development toolchain:  
> [GitHub - schisamo/omnibus-chef-utensils: A self-contained, full-stack cookbook development toolchain for Chef!](https://github.com/schisamo/omnibus-chef-utensils)
> 
> Sascha
> 
> Jeffrey Jones wrote:
> 
> Hello all.
> 
> I have decided that one of chef's greatest strengths; and biggest  
> weaknesses is the community cookbooks (but that is a post for another  
> time).
> 
> Is there any "canonical" cookbook that will install ruby (version of  
> our choosing) from source (Including the build-essential'ish  
> packages)? I have found half a dozen ruby cookbooks but none of them  
> offer the source option (I did actually find one but it is 2 years  
> old, barely documented and released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed  
> "Install ruby from source" cookbook, seems like a pretty basic  
> building block.
> 
> On a slight return to my first line, the community cookbook page  
> really REALLY needs some sorting and filtering features.
> 
> Cheers
> 
> Jeff

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [May 21, 2013, 6:02am UTC](https://discourse.chef.io/t/installing-ruby-from-source/3975/13 "2013-05-21T06:02:17Z")

</div>

Ohai,

On May 20, 2013, at 2:41 AM, Jeffrey Jones [jjones@toppan-f.co.jp](mailto:jjones@toppan-f.co.jp) wrote:

> Is there any "canonical" cookbook that will install ruby (version of our choosing) from source (Including the build-essential'ish packages)? I have found half a dozen ruby cookbooks but none of them offer the source option (I did actually find one but it is 2 years old, barely documented and released under the WTFPL)
> 
> I am pretty surprised that I could not find one "opscode" blessed "Install ruby from source" cookbook, seems like a pretty basic building block.

Generally speaking, we (Opscode) recommend building a native package for the platform of the desired Ruby version, and use Chef to install that from a local repository. In this age of API driven virtual machines/compute on demand, adding 5 minutes to build Ruby on every single instance borders on "unbearable."

Further, with the omnibus project[0](http://rubygems.org/gems/omnibus), we do recommend using it for making "full stack" installers for applications, including Ruby or other runtimes required. Generally that is the kind of build that happens in CI such as Jenkins pipelines.

That said, personally, I use Fletcher Nichol's rbenv cookbook for managing Ruby on my OS X systems.

Cheers,  
Joshua
