[Rails] Let's talk about packaging

Scott Barron scott at elitists.net
Sun Nov 7 15:05:34 GMT 2004


On Fri, Nov 05, 2004 at 02:35:23PM -0500, Chad Fowler wrote:
> On Fri, 5 Nov 2004 09:24:43 -0500, Scott Barron <scott at elitists.net> wrote:
> > Hello Railers,
> > 

[Snipping out all non-gems related topics for brevity]
 
> Jim Weirich has made a lot of progress in the area of packaging Rails
> apps as gems.  I think it's a fantastic idea.  You're right about
> making the gem depend on Rails itself.  The issues center around, as
> you say, post "install" setup.  Jim and I were discussing the
> possibility of creating a generalized post-installer for Rails apps. 
> The idea of being able to: `gem install somerailsapp` and have it
> ready to go with all of its dependencies is about as exciting as it
> gets.  I've CC'd Jim on this message in case he has anything to add. 
> You've got Apache config to worry about but you also have things like
> loading database schemas, etc.  Jim has spent a lot more time thinking
> about the issues than I have.
> 
> There is a working Instiki gem that has been contributed by a Ruby
> community member (Stoyan Zekhov).  We did some successful testing last
> night on irc.  It works now, but there are a couple of small tweaks
> that would be nice to add before releasing it.  I'm hoping to get to
> that this evening and give the final version to David.
> 
> As I said, gem-installed Rails apps would be _killer_.  I'd love to
> see any efforts made, and to hear feedback about how we could change
> RubyGems to make it easier.
> 
[...]
> 
> While confessing to being horribly time-strapped these days, please
> share your pains and successes and don't hesitate to ask for RubyGems
> help.  I'm on irc (irc.freenode.net) as "chad" and (more often) on AOL
> IM as "cefogc".  Also, Marcel Molina may not appreciate me
> volunteering him, but he's done quite a bit of great work with
> packaging gems and would probably be a good resource.  "noradio" on
> irc.

Hey Chad,

I was able to work a bit on it on Friday morning, and here are some of
the issues I ran into (I'll try to spare any "drama" for those who can't
handle truth).

#1.  It seems that if you try to install a local gem and it depends on a
remote gem, it will then try to get the first gem remotely instead of
using it locally.  This would mostly be a problem for someone who is
maintaining some gems.  I'm thinking of a situation like this: I've got
10 rails apps at work I want to make easily maintainable and deployable
as gems, and of course I wouldn't want them on the main gems server.  It
seems that one can run his own gems server, if one did that would he
have to maintain the other gems (eg rails et al) on the local gem
server?  I haven't looked too much into running my own local gem server
yet, but Marcel did seem to confirm the initial problem I was having.

#2. I guess the rest is all "post-install" issues.  It seemed that
RubyGems was not maintaining the +x bit on the files (eg dispatch.cgi)
that need to be executable.  I was able to run a rails app (as apache
CGI) from the gem with a little tweaking.  Of course, if you bump the
revision of the app you'd have to change your apache config, but I don't
know if that's a terribly big deal.  So the main parts of post-install
would be apache config, db config, setting a thing or to back to +x.

I think those were all the major issues I had.  It can be made to work
as is, though it would be sexy if RubyGems had some sort of post-install
script facility (I think RPM has this?).  It would definitely solve all
the problems in #2, though I suppose an install script could be included
as an executable in the rails app gem for now that might alleviate the
problems.

At any rate, I'd love for the world to have gem-installable rails apps.
It's a sexy thought as I would like to both release an app or two to the
world and ease my internal app management with gems.  I'm here to help
in any way that I can (I'm htonl on irc, by the way).

Cheers
-Scott
after a little tweaking.  I had to set that


More information about the Rails mailing list