- From: Daniel DeLeo <
>
- To: Brad Knowles <
>
- Cc: Chef Dev <
>
- Subject: [chef-dev] Re: Ohai Ruby plugin: system ruby vs. running ruby?
- Date: Wed, 31 Aug 2011 13:03:22 -0700
On Wednesday, August 31, 2011 at 12:59 PM, Brad Knowles wrote:
>
On Aug 31, 2011, at 2:52 PM, Daniel DeLeo wrote:
>
>
> So, if your ohai attributes for languages/ruby are empty, what breaks?
>
>
In my case, everything related to Chef. The system-provided version of ruby
>
& rubygems is old enough that it will not work with anything related to
>
Chef, and yet there are other parts of the system that are dependent on
>
that older version being installed and being installed in the
>
system-standard place. And they probably also do stupid things like
>
assuming that the path is always set up correctly so if they just shell out
>
to "ruby" it will pick up the right system-provided version.
>
>
>
So, I can't upgrade the system-provided version of ruby & ruby-gems, but I
>
have to have the newer version of ruby & ruby-gems in order to get Chef &
>
ohai to work.
>
>
Both code bases want to assume that there is one and only one installation
>
of ruby on the system, and it is necessarily the version that they need.
>
>
That's a majorly, heinously, bad assumption.
>
>
>
You can't go back and fix all the legacy code that wants to make that
>
one-and-only-one assumption, but you can at least ensure that all the new
>
code will always be able to find the right version that it actually needs,
>
without breaking or otherwise causing any disturbance for any of the older
>
code.
>
>
So, if you're going to program in Ruby, and you're going to build a system
>
that requires newer version of the code than what we can get with a
>
system-standard install, then the requirement falls onto you to make sure
>
that you make things work properly. Don't break my existing production
>
systems with your new code, and don't make me jump through hoops to get two
>
incompatible versions installed.
>
>
--
>
Brad Knowles
>
<
>
>
(mailto:
)>
The change that I'm talking about is only related to how ohai collects data
about what ruby you have installed on the system. In Chef you can access this
data as node[:languages][:ruby]. Are you currently depending on this data to
return information about the system ruby?
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.