How best to automatically deal with multiple site_ruby locations?

Posted by cclark on Server Fault See other posts from Server Fault or by cclark
Published on 2010-03-11T19:21:51Z Indexed on 2010/03/11 19:24 UTC
Read the original article Hit count: 185

Filed under:
|
|

Is there a way to automatically append to $: variable in ruby to account for additional site_ruby locations?

Ruby is installed in /usr/local/ and using gem_install will properly install the new ruby files in to /usr/local/lib/ruby/site_ruby.

However there are some RPMs for ruby bindings to tools like shadow which we'd like to install and they install to /usr/lib/ruby/site_ruby (no local). Is there a standard way to tell ruby that this directory should also be included by default?

I know scripts could dynamically update $: or they could be called with -I but it seems like this is something that should be handled in the install.

Has anyone else found a clean way around this kind of problem?

thanks, chuck

© Server Fault or respective owner

Related posts about ruby

Related posts about rubygems