Forum: Ruby Importing libraries - Installing OOo4R

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0fd334c46e284c02d4622a8ac429b236?d=identicon&s=25 Anthony Elizondo (Guest)
on 2006-06-01 16:58
(Received via mailing list)
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
31af45939fec7e3c4ed8a798c0bd9b1a?d=identicon&s=25 Matthew Smillie (Guest)
on 2006-06-01 18:20
(Received via mailing list)
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: 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.
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-06-01 18:48
(Received via mailing list)
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 Britt

"I often work by avoidance."
- Brian Eno
This topic is locked and can not be replied to.