From: "Mauricio Fernández" Date: 2004-09-29T02:56:29+09:00 Subject: Re: setup.rb and/or gem assist On Wed, Sep 29, 2004 at 01:17:27AM +0900, Hal Fulton wrote: > Hello all... > > I am rather package-phobic and usually just offer a .tgz and a readme. > But I'm thinking of doing a little more this time. If you point me to your .tgz, RPA might repackage it for you ;-) > I have an app I want to package, and I want to create a gem. > > I *believe* that setup.rb is still required, is it not?? RubyGems does not require setup.rb; it needs a "gemspec". > Anyhow, I have never used setup.rb except to play with it, and I've > never created a gem. > > Some of my constraints are: > > 1. I have libs that are require'd only by this app (i.e., they are > just separate pieces for convenience). Where should they go, and > how should I reference them in the app? If they are packaged independently, you can indicate the dependencies. You probably want to install them under a common namespace (myapp/). > 2. Same question for data files and such. Where to put them, how to > reference them? There's a problem with RubyGems + datafiles; see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/110665 and http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/110679 Data files are normally found under File.join(::Config::CONFIG["datadir"], "share") but this won't work with RubyGems so you would have to modify your program. > 3. Suppose I have a file of marshalled data and want to run a little > utility program to load it into a .db -- how/when should I do this? A mechanism to run post-installation scripts is being discussed in RubyGems' ML. It seems unlikely to be implemented, though, since the majority seems to be against it. > Any assistance appreciated. Just give me a link to the tgz :-) -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com