# Importing libraries - Installing OOo4R

**URL:** <https://www.ruby-forum.com/t/importing-libraries-installing-ooo4r/62213>\
**Category:** Ruby\
**Created:** [June 1, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/importing-libraries-installing-ooo4r/62213 "2006-06-01T16:58:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Elizondo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ebca7d/32.png) [@Anthony\_Elizondo](https://www.ruby-forum.com/u/Anthony_Elizondo)\
**Post date:** [June 1, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/importing-libraries-installing-ooo4r/62213/1 "2006-06-01T16:58:47Z")

</div>

I’ve been looking for some documentation on the proper way to import  
libraries, and I can’t seem to find any definite rules.

Suppose I want to “install” OpenOffice4R, OOo4R. Should I just copy  
the contents of lib into /usr/local/lib/ruby/1.8? (I’m working in  
FreeBSD).

How about if I just want to import it into my current irb session?

Anthony

---

<div class="post-metadata">

**Author:** ![Anthony\_Elizondo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ebca7d/32.png) [@Anthony\_Elizondo](https://www.ruby-forum.com/u/Anthony_Elizondo)\
**Post date:** [June 1, 2006, 6:20pm UTC](https://www.ruby-forum.com/t/importing-libraries-installing-ooo4r/62213/2 "2006-06-01T18:20:41Z")

</div>

On Jun 1, 2006, at 15:58, Anthony Elizondo wrote:

> I’ve been looking for some documentation on the proper way to import  
> libraries, and I can’t seem to find any definite rules.
> 
> Suppose I want to “install” OpenOffice4R, OOo4R. Should I just copy  
> the contents of lib into /usr/local/lib/ruby/1.8? (I’m working in  
> FreeBSD).

Looks like a proper package hasn’t been made for it - a bit of a  
warning sign that it might not be entirely complete, perhaps.

Anyway, what I’d suggest is:

1. go to ooo4r/redist/rubyzip and install that as if it were a  
separate package - it comes with documentation on how to install it  
(alternately, download it from here: [Best Open Source Mac Software 2023](http://sourceforge.net/projects/)  
rubyzip)

2. remove the CVS directories from the ooo4r/lib and ooo4r/lib/  
OOo4R directories.

3. copy ooo4r/lib/OOo4R to /usr/local/lib/ruby/site\_ruby/1.8/  
OOo4R (the /usr/local/lib/ruby/1.8 directory is where the standard  
libraries live, site\_ruby is where other libraries are installed)

hope that helps.  
matt smillie.

---

<div class="post-metadata">

**Author:** ![Anthony\_Elizondo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ebca7d/32.png) [@Anthony\_Elizondo](https://www.ruby-forum.com/u/Anthony_Elizondo)\
**Post date:** [June 1, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/importing-libraries-installing-ooo4r/62213/3 "2006-06-01T18:48:50Z")

</div>

Anthony Elizondo wrote:

> I’ve been looking for some documentation on the proper way to import  
> libraries, and I can’t seem to find any definite rules.
> 
> Suppose I want to “install” OpenOffice4R, OOo4R. Should I just copy  
> the contents of lib into /usr/local/lib/ruby/1.8? (I’m working in  
> FreeBSD).

I think you’ll want to put them under lib/site\_ruby/1.8

> How about if I just want to import it into my current irb session?

So long as your Ruby load path ($:) knows where to find the libraries  
you should be OK.

$:.unshift( “/path/to/ooo4r/”)

(I’ve started making a gem version of OOo4R, but assorted demands have  
sidetracked me. I’ve ended up not using OOo as much as I had  
anticipated, so attention to the Ruby code has waned. And the libs were  
written against OOo 1.x, so they may not work with OOo 2.)

–  
James B.

“I often work by avoidance.”

- Brian Eno
