Pre-chef scripts, setting ruby in path etc


#1

I am currently doing the following before I run my chef solo on a server:

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install -y wget build-essential ruby1.8 ruby1.8-dev irb1.8
rdoc1.8 zlib1g-dev libopenssl-ruby1.8 rubygems1.8 libopenssl-ruby
libzlib-ruby libssl-dev libpcre3-dev libcurl4-openssl-dev

sudo apt-get install -y rubygems
sudo gem install -y rake bundler

and then chef related:

sudo gem install -y ohai chef --no-ri --no-rdoc

One thing, ruby doesn’t seem to be in my path, and I want to make sure ruby
1.9.3 is setup on the server also before running chef.

Any advise on how to make sure ruby 1.9.3 is setup as the default and in
the path (in an automated, scripted fashion)?


#2

It’s highly recommended to use the Omnibus installers.
They ship with their own ruby embedded, along with every thing else above libc.

curl -L http://www.opscode.com/chef/install.sh | sh

-s

On Sun, Dec 9, 2012 at 8:35 AM, S Ahmed sahmed1020@gmail.com wrote:

I am currently doing the following before I run my chef solo on a server:

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install -y wget build-essential ruby1.8 ruby1.8-dev irb1.8
rdoc1.8 zlib1g-dev libopenssl-ruby1.8 rubygems1.8 libopenssl-ruby
libzlib-ruby libssl-dev libpcre3-dev libcurl4-openssl-dev

sudo apt-get install -y rubygems
sudo gem install -y rake bundler

and then chef related:

sudo gem install -y ohai chef --no-ri --no-rdoc

One thing, ruby doesn’t seem to be in my path, and I want to make sure ruby
1.9.3 is setup on the server also before running chef.

Any advise on how to make sure ruby 1.9.3 is setup as the default and in the
path (in an automated, scripted fashion)?


#3

Is there a doc for this?

Confused on what ruby embed will do, is it just for installed chef and then
it will go away? :slight_smile:

I was hoping to get ruby 1.9.3 available, and it in my path etc.

On Sun, Dec 9, 2012 at 12:15 PM, Sean OMeara someara@gmail.com wrote:

It’s highly recommended to use the Omnibus installers.
They ship with their own ruby embedded, along with every thing else above
libc.

curl -L http://www.opscode.com/chef/install.sh | sh

-s

On Sun, Dec 9, 2012 at 8:35 AM, S Ahmed sahmed1020@gmail.com wrote:

I am currently doing the following before I run my chef solo on a server:

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install -y wget build-essential ruby1.8 ruby1.8-dev irb1.8
rdoc1.8 zlib1g-dev libopenssl-ruby1.8 rubygems1.8 libopenssl-ruby
libzlib-ruby libssl-dev libpcre3-dev libcurl4-openssl-dev

sudo apt-get install -y rubygems
sudo gem install -y rake bundler

and then chef related:

sudo gem install -y ohai chef --no-ri --no-rdoc

One thing, ruby doesn’t seem to be in my path, and I want to make sure
ruby
1.9.3 is setup on the server also before running chef.

Any advise on how to make sure ruby 1.9.3 is setup as the default and in
the
path (in an automated, scripted fashion)?


#4

The embedded ruby is just for Chef itself to use.
You can then use Chef to install a system ruby for use by other applications.
I recommend using the rbenv cookbook from the community site.

-s

On Sun, Dec 9, 2012 at 12:42 PM, S Ahmed sahmed1020@gmail.com wrote:

Is there a doc for this?

Confused on what ruby embed will do, is it just for installed chef and then
it will go away? :slight_smile:

I was hoping to get ruby 1.9.3 available, and it in my path etc.

On Sun, Dec 9, 2012 at 12:15 PM, Sean OMeara someara@gmail.com wrote:

It’s highly recommended to use the Omnibus installers.
They ship with their own ruby embedded, along with every thing else above
libc.

curl -L http://www.opscode.com/chef/install.sh | sh

-s

On Sun, Dec 9, 2012 at 8:35 AM, S Ahmed sahmed1020@gmail.com wrote:

I am currently doing the following before I run my chef solo on a
server:

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install -y wget build-essential ruby1.8 ruby1.8-dev irb1.8
rdoc1.8 zlib1g-dev libopenssl-ruby1.8 rubygems1.8 libopenssl-ruby
libzlib-ruby libssl-dev libpcre3-dev libcurl4-openssl-dev

sudo apt-get install -y rubygems
sudo gem install -y rake bundler

and then chef related:

sudo gem install -y ohai chef --no-ri --no-rdoc

One thing, ruby doesn’t seem to be in my path, and I want to make sure
ruby
1.9.3 is setup on the server also before running chef.

Any advise on how to make sure ruby 1.9.3 is setup as the default and in
the
path (in an automated, scripted fashion)?