valibuk.net

A place for opinions and notes of a valibuk.

Ruby on Rails, Capistrano, Mongrel and nginx on Gentoo

Tagged with: — ondrej at 1:25 am on Thursday, August 30, 2007

Ruby on Rails A few months ago I wrote quite popular :) manual how to install and use RoR, Capistrano and Mongrel with Apache on Gentoo. Things changed a little as the time goes and after some experiences with the nginx server on a Slicehost slice, I decided to write an updated manual and to use the nginx server instead of the Apache HTTP Server. Let’s start :)

A deployment process should be straightforward and automatic as much as possible. The main reason is that this process will be repeated many times and omitted or wrong steps usually cause hey-what-are-you-doing-the-site-does-not-work calls or e-mails from your customers. Fortunately, there is a nice tool for Ruby on Rails applications — Capistrano.

Larry the CowNow we know about a tool to automate the deployment of an application, but we need to deploy our application to a production environment — I decided for the combination of Mongrel and nginx.

…and everything runs on Gentoo :)

Here is my short howto:
(There is more where this came from … )

Focus On Form Element

Tagged with: — ondrej at 3:34 pm on Sunday, August 19, 2007

Ruby on Rails Ruby on Rails supports forms very comfortably: generating a form from a model, updating data of a model or validating input values. But I always missed one functionality: to set a focus on an element.

It is quite frustrating: a form shows in your browser, you start typing and you are overwriting the actual URL or you are typing to a quick find box. Well, it is my fault, because I did not check if the text cursor | is blinking in one of the form input boxes, so then I click to a wanted input box and, finally, I am typing to the right box :)

But there is a way how to save a movement with a mouse and one mouse click: to set the focus on one of the form elements. (Btw. you can also use the Tab key, but I need to press it 4-times to get to the first input box on a form in my Firefox. Surprisingly, I do not use this way so often. :)

(There is more where this came from … )