# Setting up Ruby libraries

**URL:** <https://www.ruby-forum.com/t/setting-up-ruby-libraries/98206>\
**Category:** Ruby\
**Created:** [July 13, 2006, 2:55am UTC](https://www.ruby-forum.com/t/setting-up-ruby-libraries/98206 "2006-07-13T02:55:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 13, 2006, 2:55am UTC](https://www.ruby-forum.com/t/setting-up-ruby-libraries/98206/1 "2006-07-13T02:55:54Z")

</div>

In my group, we typically set up software dependencies like this:

/libraries  
/gtk  
/2.4.11  
/rhel3  
/usr/  
/bin/  
/share  
/lib  
/irix  
# etc  
/gcc  
/3.3.1  
/bin  
#etc

So, we have libraries and utilities that we depend on installed to a  
separate directory, one directory for each different version and  
architecture. How can we do the same with Ruby and its libraries?  
I’d like to see something like:

/ruby  
/1.8.4  
/rhel3  
# ruby stuff  
/1.8.5  
/rhel3  
/irix  
# ruby stuff

/ruby-gnome2  
/0.14.1  
/rhel3  
/irix  
/0.15.1  
etc

/rmagick  
/1.0  
/2.0

So, each different Ruby library or gem would be installed to a  
different folder. Is that possible? By default, all the Ruby  
libraries and gems are installed inside the Ruby directory. And I  
think I’d prefer to keep them separate.

Any advice?

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 13, 2006, 6:27pm UTC](https://www.ruby-forum.com/t/setting-up-ruby-libraries/98206/2 "2006-07-13T18:27:18Z")

</div>

On 7/12/06, Joe Van D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> /irix
> 
> ```
> 
> I’d like to see something like:  
> /ruby-gnome2  
> So, each different Ruby library or gem would be installed to a  
> different folder. Is that possible? By default, all the Ruby  
> libraries and gems are installed inside the Ruby directory. And I  
> think I’d prefer to keep them separate.

Simpler question:

Ruby is installed in /foo. I want to install a Ruby library to /goo,  
and another Ruby library to /bar. How straight forward is that to set  
up? What flags to I need to give to each libraries setup.rb or  
exec\_conf.rb?

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 13, 2006, 7:05pm UTC](https://www.ruby-forum.com/t/setting-up-ruby-libraries/98206/3 "2006-07-13T19:05:26Z")

</div>

Joe Van D. wrote:

> Simpler question:
> 
> Ruby is installed in /foo. I want to install a Ruby library to /goo,  
> and another Ruby library to /bar. How straight forward is that to set  
> up? What flags to I need to give to each libraries setup.rb or  
> exec\_conf.rb?

sudo ruby setup.rb install --prefix=“foo”

You’ll either need to symlink into the typical paths or add to the  
$LOAD\_PATH.

BTW, gems basically does this already, albiet foo-1.0.0/, Not usre  
about architecture though.

Also, I have a project that relates to this, so I’m wonder what you  
working on?

T.
