- From: Bryan McLellan <
>
- To: Daniel DeLeo <
>
- Cc:
- Subject: [[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] Use of require in chef
- Date: Fri, 13 Nov 2009 11:52:06 -0800
On Fri, Nov 13, 2009 at 11:23 AM, Daniel DeLeo
<
>
wrote:
>
As rubygems will modify the executables on install, the only downside to
>
banishing `require "rubygems"` everywhere is that you'd have to run, for
>
example, `ruby -rubygems bin/chef-client` to run the code out of a git
>
clone. This can easily be tucked away from view inside the rake tasks for
>
running a development instance or integration tests, so the impact would be
>
minimal.
I just want to point out that this shouldn't be a requirement if you
have all of the required libraries in your ruby $LOAD_PATH. If you
have mixlib-* and everything else required installed via your
distributions packaging into the $LOAD_PATH, life is fine. 'ruby
-rubygems' is a shortcut that gets you the rubygems custom_require
that replaces Kernel#require and activates a specific version of a gem
then requires it from the gem path. Granted, during development you
often have versions of libraries that are not yet packaged by your
distribution, and it is standard practice to install those as gem
packages.
Archive powered by MHonArc 2.6.16.