[Rails] Let's talk about packaging
Scott Barron
scott at elitists.net
Mon Nov 8 14:52:32 GMT 2004
On Mon, Nov 08, 2004 at 02:26:04PM -0000, Jim Weirich wrote:
> Some comments based on what I did with storycards ...
>
> Scott Barron said:
> > [...] 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
>
> I only stored site changable stuff outside the gem directory. This
> included configuration information and the logging directory.
Well, wouldn't the user want to choose where, outside the gem directory,
these things would go? If one is using apache, then either public/ will
have to go outside of the gems directory (preferred), or apache will
have to point at public/ in the gems directory.
> > - Run the `rails' command to start a nice fresh rails directory.
>
> No, because much of the application resided in the gem directory. No need
> to run rails.
>
> Even if the app were stored outside of the gem area, I think I would just
> copy it from the gem area master. It should all be there, no need to run
> the rails initialize directory script.
Indeed, you're right here. I remember now that I did have to change the
way rails was pulled in in shared.rb from "require 'active_record'" to
"require_gem 'activerecord'" and such. So yeah, a new 'rails' would not
have to be run. My mistake.
> > - 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 didn't address this since I am using webrick only for now.
Good, then we now have someone addressing Apache and someone addressing
webrick, so we should get all the bases covered (though I still have not
set up fast cgi and don't know what that entails yet).
> > - I don't know anything about webrick, fcgi, or mod_ruby
> > installations, anyone with thoughts on that?
>
> Webrick was easy. The main program was installed into /usr/local/bin by
> gem (as all commands are) and you just ran it. The main program took care
> of default ports and what not, but would accept options (as does the
> original webrick dispatcher). Not hard at all.
I figured webrick would be quite easy to set up (given the example of
Instiki and it's lack of a step 3). Just as long as nothing assumes
/usr/local/bin (I know the dispatch and script files of rails do,
something I feel should be changed, but that's another issue).
> You also need to address the initialization of the database schema. I
> didn't do anything here but make the schema available in a MySQL format
> for manual creation.
I think this is fine. To auto-load it you'd have to get from them db
credentials for a user with appropriate permissions (create database,
create tables, etc) which they may or may not have. Probably more
trouble than it's worth (though I could be convinced otherwise).
Thanks for your input Jim, very valuable and much appreciated (story
cards is pretty cool, by the way).
Thanks
-Scott
More information about the Rails
mailing list