Ruby/Rails in the Valley: the Silicon Valley Ruby Conference

David Black sends along this note about the upcoming Silicon Valley Ruby Conference, which features Rails core’s own Marcel Molina Jr. and Jeremy Kemper:

Ruby Central is a name you can trust in conferences (RubyConf and
RailsConf), and now Ruby Central has teamed up with SDForum to present

Silicon Valley Ruby Conference April 22-23, 2006

The impetus for this event was SDForum’s interest in producing a top-notch conference with a regional focus but with broad Ruby/Rails
appeal. SDForum asked Ruby Central to co-produce the event, and
the Silicon Valley Ruby Conference is the result.

Who should attend this conference? Everyone who didn’t get into
RailsConf. Plus, everyone who DID get into RailsConf! Don’t let the
subtle marketing fool you: this is one of the major Ruby/Rails events
of the year.

Speakers include:

and many others.

Questions? Contact David Black (

Auto sanitized templates with Erubis

Last month on the Rails core mailing list, a thread popped up (that went on and on) wherein the idea was proposed that rhtml templates should automatically sanitize output by default. After much back and forth, David suggested those in favor redirect their energies toward a working plugin.

Enter stage left, Erubis. It’s a customized implementation of eRuby that provides a handful of features, notably that <%= %> tags automatically sanitize output. You use <%== %> if you don’t want to sanitize the output. For all those who wish rhtml files were sanitized by default, here is your solution.

Configure your Rails apps to use Erubis templates with ActionView::Base::register_template_handler.

The Adventures of Scaling: A Case Study

Patrick Lenz has started in on a case study The adventures of scaling, in four instalments, on how he made scale, improving its performance by about 60%.

The online community site was ported from 50,000 lines of PHP to 5,000 lines of Rails. It serves up over 1 million dynamic page impressions on a “good day”. This first instalment goes through their unsuitable initial setup and explains why it didn’t work, including a diagram of their configuration. As one of the article’s commenters says, “Nothing beats a shiny chart”. Looks promising. Good start. Thanks for the write up Patrick. Stay tuned.

Bruce Tate on the Rails podcast

While down in Austin for SXSW, Geoffrey Grosenbach caught up with Bruce Tate for the Ruby on Rails podcast. Bruce talks about how Rails is the catalyst behind a sea change in the development world. Download as mp3 or mp4.

A long time Java developer, earlier this year Bruce put out a book called Beyond Java which caused quite a stir.

He also just wrote an article for IBM’s developer Works about Active Record aimed at Java developers called Crossing Borders: Exploring Active Record .

Keep an eye out for his upcoming Java to Ruby book. Your boss will thank you for alerting him/her to it one day.

Rails makes headlines down under

The Australian version of ComputerWorld has a great article about how Ruby on Rails is helping Spin Technologies migrate school portal get off .NET. Jordan Brock speaks about how fast Rails is to get started with and recommends that others get going by doing a small application first. Good advice and great to see Rails making headlines down under.

Fast Rake Task Completion for Zsh

Those of you who love running Rake tasks but don’t like typing are in for a treat. Although there’s been task completion for Rake for a while now, most of the scripts for it are painfully slow, especially with Rails’ Rakefile.

Below is a small zsh completion script that uses a cache file (named .rake_tasks) to improve the performance of your tab keystrokes.

To use, throw it in your home folder somewhere and add source $HOME/.rake_completion.zsh to your .zshrc file.

A few disclaimers: Yes, it doesn’t work with lowercase named rakefile‘s. Only barbarians use such names though, so hopefully you won’t have a problem there. And no, it doesn’t complete the other assorted arguments that the rake command can accept, frankly because I rarely use them.

Without further ado, here’s the bytes.

_rake_does_task_list_need_generating () {
  if [ ! -f .rake_tasks ]; then return 0;
    accurate=$(stat -f%m .rake_tasks)
    changed=$(stat -f%m Rakefile)
    return $(expr $accurate '>=' $changed)

_rake () {
  if [ -f Rakefile ]; then
    if _rake_does_task_list_need_generating; then
      echo "\nGenerating .rake_tasks..." > /dev/stderr
      rake --silent --tasks | cut -d " " -f 2 > .rake_tasks
    compadd `cat .rake_tasks`

compdef _rake rake

(Use at your own risk. Comments and improvements welcome.)

2.5 Million Requests

In case you were wondering if Rails can scale: Eric Hodel reports that the Robot Co-op served 2,587,240 requests through their Rails applications last Saturday.

Do you have any scalability stories to share?