[Rails] Let's talk about packaging

Scott Barron scott at elitists.net
Mon Nov 8 13:32:51 GMT 2004


> > #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.  
> 
> Yea, this is a known bug that will be fixed in the next release.  Sorry. :)

Most excellent!

> So, you're saying you pointed apache directly at the location of the
> installed gem?  Interesting.  Not what I was expecting at all.  I was
> envisioning some kind of install-then-deploy scenario.  Do you have a
> sample app you were playing with that we could try?

This is what I did, but mostly as a "proof of concept" thing to get
started.  It didn't really "feel good" pointing apache down into the
gems directory, but it did work.  A deploy script would sit much more
cozier with me.  The app I was playing with is internal and not
releasable but if I get some time I'll do up the Elite Journal app and
maybe bang on a deploy script.  Have you or Jim Weirich done any work
(or even outlining) of such a deploy script?  I'm thinking it'd have to
do at least the following:
  - Get from the user the place the application would be insatlled
    - With this it should probably check if there is an existing
      application installed there, and possibly check against version
      numbers?  Thoughts on updating this?
  - Run the `rails' command to start a nice fresh rails directory.
  - Add the application files to the new rails set up.
  - Get some DB config parameters from the user to set up database.yml.
  - Spit out a hunk of code for Apache configuration.
    - If this is going to be a non-vhost apache it would also need to
      make some changes to .htaccess.
  - I don't know anything about webrick, fcgi, or mod_ruby
    installations, anyone with thoughts on that?
 
> Yea.  There has been a lot of discussion and not very much work done
> regarding post-install scripts.  I'm sure the day will come, but I
> have yet to find the time to implement it (nor has anyone else). 
> You're right, though.

Indeed, time is hard to come by these days.  I think if some kind of
deploy script is made, which can be called manually now, can easily
graft into a post-install script once that facility becomes available in
RubyGems.  I've got a few important things on the old TODO list for the
beginning of the week, but once I clear those out I'll have some more
time to work on this (unless someone beats me to it ;).

> Ahh, now I know who you are!  You people and your weird irc nicks! ;)

Weird, creative, it's all the same ;) (I think someone already owns
"scott" so I went with the next best thing).

-Scott


More information about the Rails mailing list