Riding Rails in South America

One of the objectives of the RailsBridge Open Workshops is diversity, so I asked Carmen Díaz Echauri to write in Spanish about her experience leading a small workshop when she traveled back to her hometown. Read the original blog in Spanish, or for non-Spanish speakers, read an English translation of Carmen’s post below.

In October 2010, I attended three different software conferences in South America. One of them, CLEI (Conferencia Latinoamericana de Informática), which was held in my home town, Asunción.

Because I was going to spend two weeks in Paraguay, it seemed like a great opportunity to hold a mini-workshop and share my Ruby on Rails experience. So, a few days before my trip, I sent an email to the dean of the Universidad Católica de Asunción, where I had graduated, and suggested we hold a workshop at the university.

The University offered me the use of a computer lab and the technical staff set up their computers, which were running Ubuntu, with Ruby 1.8.7 and Rails 3.0.0, so I didn’t have to worry about installation.

First year engineering students, some professors and assistant professors attended the workshop. Because I had relatively little time to teach, I couldn’t use the complete RailsBridge workshop curriculum, so I had to adapt the curriculum that I had previously translated, which basically consisted of giving an explanation of the Rails framework, talking a bit about the “test first” culture and best practices in test-driven development.

This was what I covered in about 2 hours:

* What is the Ruby language? a bit of history
* What is Ruby on Rails and why is it called a framework?
* The structure of the framework
* Model View Controller in action

Exploration of the development process consisting of writing failing tests first and then making them pass with correct code. The explanation basically consisted of:
* TDD (test-driven development)
* BDD (behavior-driven development)

At the end of the presentation, we built a demo application in 6 basic steps. I called it “Riding Rails in 6 steps”

1) $ rails new jugando
2) $ vim Gemfile
source ‘http://rubygems.org’
gem ‘rails’, ‘3.0.0’
gem ‘sqlite3-ruby’, ‘1.2.5’, :require => ‘sqlite3’

At this point, I took some valuable time to explain the Gemfile manifest and emphasize all of the different libraries defined within it.

3) $ bundle install
Here, I explained how dependent libraries are managed.

4) $ rails generate scaffold juego titulo:string descripcion:text url:string
Here, I explained what “Scaffold” does.

5) $ rake db:create # If the db is not sqlite.
$ rake db:migrate

At this point, I briefly explained “Rake”.

6) $ rails server

As we were concluding the workshop and building the application, I also took some time to answer questions from the students. It was a challenging, yet enriching experience, since their questions about bundle, scaffold and Gemfile were difficult to answer in Spanish because we don’t have a frame of reference for these concepts. At the end of the tutorial, we added 4 more steps to create a controller and model with corresponding tests in RSpec.

I want to thank the University for this wonderful honor and even though I was leading the workshop, I feel as if I am the one who learned the most from these talented students and faculty.

Riding Rails in South America