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
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:
-
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
rubyzip)
-
remove the CVS directories from the ooo4r/lib and ooo4r/lib/
OOo4R directories.
-
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.
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.”