I have written a program, which has several files. Now my question is,
where to install all these files.
Normally all files are installed in e.g.
/usr/lib/ruby/1.8/site_ruby/programname/. But when the files are installed
in site_ruby, they are accessable by every other program. This is not
needed, because these files are no libraries. My program simply is split
in several files. Shouldn´t program files be installed in /usr/bin? Or
maybe installing the files to: /usr/local/programname?
Programs written in C are linked to one binary and installed to /usr/bin.
This isn´t possible with ruby. I´ve heard, that there are tools for
making one ruby file, out of several ruby files. (rake)
But this isn´t what I am looking for.
What is the official target for such files, which are not libraries and
shouldn´t be accessed by any other program?
I have written a program, which has several files. Now my question is,
where to install all these files.
Normally all files are installed in e.g.
/usr/lib/ruby/1.8/site_ruby/programname/. But when the files are installed
in site_ruby, they are accessable by every other program. This is not
needed, because these files are no libraries. My program simply is split
in several files. Shouldn´t program files be installed in /usr/bin? Or
maybe installing the files to: /usr/local/programname?
Programs written in C are linked to one binary and installed to /usr/bin.
This isn´t possible with ruby. I´ve heard, that there are tools for
making one ruby file, out of several ruby files. (rake)
Normally all files are installed in e.g.
/usr/lib/ruby/1.8/site_ruby/programname/.
Not all files are installed in site_ruby. Only common library
files should be placed here. Files which belong to one
application should be placed in one directory tree.
Shouldn´t program files be installed in /usr/bin? Or maybe
installing the files to: /usr/local/programname?
That's good if you want your application to only run on Linux.
It's not good if you want your application to be more platform
agnostic.
If you want stick to FHS, you could append a private library
path to LOAD_PATH:
What is the official target for such files, which are not
libraries and shouldn´t be accessed by any other program?
I've written down my ideas about building and distributing Ruby
applications [1], as well as implemented some of the ideas [2,
3] By the way, it's not official...
and then you can let users put the dir wherever they want?
Because that way you need to change to the directory where the files are, before running the program.
What would be really useful would be a way to find the path to the currently executing Ruby file. Then you could stick that on the LOAD_PATH to let the program find all the other files.
and then you can let users put the dir wherever they want?
Because that way you need to change to the directory where the files are, before running the program.
What would be really useful would be a way to find the path to the currently executing Ruby file. Then you could stick that on the LOAD_PATH to let the program find all the other files.
(I had a look, but couldn't find such a thing.)
--
email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
My religion is very simple. My religion is kindness.
--Tenzin Gyatso