[typo] Deploying Ruby on Rails Applications (was: Re: Can't update feeds?)

Scott Likens damm at livid.dk
Wed Jul 16 18:38:13 EDT 2008

On Jul 16, 2008, at 6:43 AM, Chet Farmer wrote:

> On Jul 16, 2008, at 6:04 AM, Scott Likens wrote:
>> Which portion of the documentation needs to be revised? FastCGI?  
>> Mongrel?
> Honestly, all of it. I know that's a broad answer, but it's the  
> truth. Compare the installation experience of a LAMP stack tool to  
> Typo's and you'll see the huge gap.
> In particular, deeper descriptions of why Mongrel needs to be  
> involved, what the alternatives to a Mongrel configuration are, and  
> why one might choose one approach over the other are ALL questions  
> that need to be addressed. I made that clear in my prior post.

We are comparing an Apple to a Pear, LAMP is not the same as LAMR or a  
Ruby on Rails install.  Please stop comparing it, you are doing  
nothing useful by doing that.

What is mongrel? Let's see here if this quote satisfy's you.

"Mongrel is a small library that provides a very fast HTTP 1.1 server  
for Ruby web applications. It is not particular to any framework, and  
is intended to be just enough to get a web application running behind  
a more complete and robust web server.

What makes Mongrel so fast is the careful use of an Ragel extension to  
provide fast, accurate HTTP 1.1 protocol parsing. This makes the  
server scream without too many portability issues.

See mongrel.rubyforge.org for more information. "

A bit technical, but Mongrel is a Web Server.  Like Apache, or nginx  
or lighttpd.  Except that all it cares about and knows about is the  
application in which it is running.  Technically you can run it on  
port 80 (if you run it as root) and remove the whole extra web server  
from the equation.  Mongrel is for Ruby what mod_php is for Rails (bad  
analogy).  It does all the dirty work and forwards the end product to  
Apache and then to the end-user.  You can compare it to Tomcat or  
Jetty I guess, however that's not here nor there.

>> Typo is imo extremely easy to deploy and get up in running in under  
>> 5 minutes.
> Here, you're just plain wrong.
>> If your having a problem deploying typo please elaborate and tell  
>> us what the problem is with you deploying Typo so we can help you  
>> deploy it?
> I had problems getting mine to run, that's certainly true. But at  
> this point my Typo runs (just not in the way I really want it do;  
> the machine can't also run Apache -- as, again, I've made clear  
> before).
> My issues are bugs in Typo. If I can't get those bugs resolved,  
> Typo's quirky and difficult installation issues will become  
> academic, as I'll have to migrate to something else. The important  
> bugs to ME are:
> -- my feeds do not dynamically update. They get created when first  
> requested, but are then frozen in amber.
> -- Typo does not work properly with MarsEdit or other stand-alone  
> editors. This is a show-stopper for me.
> I also have some other outstanding questions regarding updating my  
> Typo, and verifying the version I have, but those are in another  
> mail I posted early yesterday, I believe, and are part of a dialog  
> with Frederic.
> - How do I verify what version of Typo I have?
> - How is it best to upgrade Typo? What specific steps should be  
> taken, and why?

Frédéric has pretty much gone into the other problems you addressed.

However, the best method of updating/upgrading typo depends on the  

Let's say you use SQLite3

1) backup your databases in db/ to a separate location
2) unarchive the new version of typo in a separate directory (for  
staging or testing purposes).
3) copy the backed up databases (do not move them, we want to keep a  
pristine copy still somewhere) to db/
4) verify you are using the proper environment (e.g. PRODUCTION /  
DEVELOPMENT ...) and then run rake db:migrate
5) start typo on a different port then the original typo is running on.
6) Browse to the site by ip:port and verify if everything worked as  
planned, and if it did not discuss how it did not work properly, and  
if it did work how it can work easier.

... Now let's say you use MySQL.

1) mysqldump your typo database for backup purposes.
2) mysqlhotcopy -u root -p typo typo2
3) fixup the grants if need be so your typo login can see typo2 (if  
you use the root account for typo you can skip this step)
4) unarchive the new version of typo, and setup database.yml to see  
typo2 and the proper credentials and settings.
5) rake db:migrate
6) start typo on a different port and test it out.

Of course you'll have to reinstall your plugins and themes.  I believe  
as a standard practice it's best to set the theme to default and  
disable your plugins before you do the backup.  I don't know if  
Frédéric has resolved the technical details of plugins missing and  
themes missing and having to goto the admin interface and fix it, or  
delve into the MySQL database and disable plugins that way.

But that's a pretty short write-up.

More information about the Typo-list mailing list