[Rails] Let's talk about packaging
Jim Weirich
jim at weirichhouse.org
Mon Nov 8 14:26:04 GMT 2004
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.
> - With this it should probably check if there is an existing
> application installed there, and possibly check against version
> numbers? Thoughts on updating this?
Since I only stored config information, I would read the configs if they
already existed.
> - 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.
> - Add the application files to the new rails set up.
No need, if config only.
> - Get some DB config parameters from the user to set up database.yml.
Yes, done through an interactive configuration script.
> - 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.
> - 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.
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.
--
-- Jim Weirich jim at weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
More information about the Rails
mailing list