Skip navigation

Required Packages

From the Solaris 10 OS Companion Software CD install the packages below, this will get you up and running with Ruby 1.3.5:

  1. SFWruby
  2. SFWrline
  3. SFWncur
  4. SFWcoreu

Install & Update RubyGems

In this step we’ll install a version of RubyGems compatible with our version of Ruby, 1.3.5.

cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.5.tgz
gtar -zxf rubygems-1.3.5.tgz
cd rubygems-1.3.5
/opt/sfw/bin/ruby setup.rb
/opt/sfw/bin/gem install rubygems-update
/opt/sfw/bin/gem update --system

Who the hell is Steve?

To avoid the error message below, run:

mkdir -p /export/home/steve/work/usr/src/tools
ln -s /usr/sfw/bin/gcc /export/home/steve/work/usr/src/tools/gcc

make
/export/home/steve/work/usr/src/tools/gcc -I/usr/sfw/include -I/export/home/steve/work/proto/root_i386/opt/sfw/include -I. -I/opt/sfw/lib/ruby/1.8/i386-solaris2.10 -I/opt/sfw/lib/ruby/1.8/i386-solaris2.10 -I. -fPIC -g -O3 -Wall -c generator.c
sh: /export/home/steve/work/usr/src/tools/gcc: not found

Install Chef with RubyGems

gem install chef

Oh no!

At this point you’ll get this error when attempting to run ‘chef-client’:

ld.so.1: ruby: fatal: relocation error: file /opt/sfw/lib/ruby/gems/1.8/gems/json-1.4.2/ext/json/ext/json/ext/parser.so: symbol RSTRING_PTR: referenced symbol not found
Killed

Worry not! See below.

Replace json with json_pure

gem uninstall json
gem install json_pure --version 1.4.2
cat /opt/sfw/lib/ruby/gems/1.8/specifications/json_pure-1.4.2.gemspec | sed s/json_pure/json/g > /opt/sfw/lib/ruby/gems/1.8/specifications/json-1.4.2.gemspec
cp -pr /opt/sfw/lib/ruby/gems/1.8/gems/json_pure-1.4.2 /opt/sfw/lib/ruby/gems/1.8/gems/json-1.4.2

Victory!

chef-client

[Wed, 08 Sep 2010 17:21:09 -0700] INFO: Client key /etc/chef/client.pem is not present – registering
[Wed, 08 Sep 2010 17:21:10 -0700] WARN: HTTP Request Returned 404 Not Found: Cannot load node stress10.
[Wed, 08 Sep 2010 17:21:11 -0700] INFO: Starting Chef Run (Version 0.9.8)
[Wed, 08 Sep 2010 17:21:11 -0700] WARN: Node stress10. has an empty run list.
[Wed, 08 Sep 2010 17:21:11 -0700] INFO: Chef Run complete in 0.830921 seconds
[Wed, 08 Sep 2010 17:21:11 -0700] INFO: Running report handlers
[Wed, 08 Sep 2010 17:21:11 -0700] INFO: Report handlers complete

Done!

About these ads

2 Comments

  1. Isn’t it better to install CSWruby instead? It’s in version 1.8.7 and comes with rubygems, too.

  2. And for security updates you do what exactly? Run around checking package after package to see if there are updates then them apply them all one-at-a-time? Sheesh.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: