From: Joel VanderWerf Date: 2005-09-04T04:52:07+09:00 Subject: Re: Installing a ruby application on a linux system Michael Gebhart wrote: > Hi, > > I have a question about installation ruby applications on a linux system. > I am discussing with other ruby developers about the correct path where to > install all the ruby files. > > We don�t want to create one big file with rbasm, or using the > tar-ruby-scripts to create a tar archive. We simply wanna install all the > ruby files, we have :) > > We are using setup.rb for our installations. But the problem is: > > We have some files, that are really usable as modules. So these files can > be installed to /usr/lib/ruby/site-ruby and so on. > > But what about files, which are not very usable as modules? E.g. the GUI > of a program? (We are using ruby-gnome) Should these files be installed in > the ruby dir too? > > We thought about using a directory in /bin. E.g.: > > /bin/myapp > > Or maybe /usr/lib/myapp? Or /usr/share/myapp/lib? > > Do you have any idea, what is the right path to do this? Or maybe a mixed > way: Using rbasm to create one big file for the gui and placing it in /bin > and copying all other files, which can be modules to the ruby-dir? > > Or simply copying all files to the ruby-dir? > (/usr/lib/ruby/site-ruby/1.8/myapp) > > Maybe you have any idea for us, how to install the apps correctly :) There > is no common way, to do this, right? > > Greetings > > Mike The standard install.rb (and also setup.rb, which is similar, IIRC) copies from your bin/ dir to the standard bin dir for your ruby installation. On my system that is /usr/local/bin. So why not just put the main entry point (which can be very simple--just require a lib file and invoke a method) for your GUI in bin/, leave the libs in lib/, and let the user run setup.rb? BTW, you can test what install.rb (and probably setup.rb) will do using the 'ruby install.rb install --no-harm' option. What is rbasm? I don't see it on RAA. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407