None of us is as smart as all of us.

Workshop Ruby on Rails and Maglev

I was asked to give an introductory workshop in Ruby on Rails for an insurance company. An intranet application was build in Ruby on Rails for this company and now they want to have the knowledge to maintain the application themselves. So I organized a workshop in two sessions to touch on the basics of Ruby and Rails. And I have to say, it is not easy …. especially when this application has polymorphic and has_many :through associations… :-)

I myself started with Ruby on Rails in October 2005 (I had no experience with Ruby at all) and I remember it was straight forward, although it toke me a while to understand (for example) some of the magic of ActiveRecord (made possible by Ruby). But now 2,5 years later we have Rails 2.1 (since yesterday!) and it has a lot of new concepts and extra features and therefore I think it is a lot harder to get started. My preparation for this workshop made me realise that now it will take more time to really get acquainted with the full potential of Rails.

And to be honest, working every day with Rails, it still is a challenge to keep up-to-date with the new features in Rails (which seems to be added almost ‘every’ day) and all the new developments and innovation in the Ruby and Rails community. The day before yesterday I had never heard of Maglev or Mongrel-esi…..

Global Include for Nginx With a Wildcard.

We use Nginx as our webserver and loadbalancer with several different rails applications and we’re very satisfied with it. I thought let’s share the way we set up de nginx config file, because so far I haven’t read it elsewere.

In the global config file of nginx we use includes with wildcards, for example:

    include /u/apps/*/current/config/nginx.conf;
    include /u/apps/*/config/nginx.conf;

So now we only have to take care of the individual settings of an rails application for configuring its virtual domain(s), rewrite rules and etcetera in its own ‘local’ nginx.conf file in the rails/config directory (which is of course under version control).

When you want to start a new application after deployment, first test the configuration settings of nginx as follows:

  cd /usr/local/nginx
  sudo ./sbin/nginx -t

If everything is ok, you get something like this:

2008/05/09 17:06:10 [info] 19177#0: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
2008/05/09 17:06:10 [info] 19177#0: the configuration file /usr/local/nginx/conf/nginx.conf was tested successfully

Restart Nginx (all the local config files will be included as well), start your application and you’re done.

  sudo /etc/init.d/nginx restart

Very practical!

(Credits to my collegue Matthijs Kadijk.)

A Great Day….

Yesterday, we had a great day on our Entrepreneurs conference here on the island of Texel.

We gave a keynote presentation about the concept Fablab, which went very well.

It was nice to have a lot of new contacts with the local community and it gave us new ideas for the next steps in establishing a FabLab on Texel.

Google Sketchup With Ruby API.

Because of our involvement in the Fablab community, we’re very interested in extending the functionality of Google Sketchup with the Ruby API. We like to use Sketchup for basic 2.5D snapfit design, for example like this or this. For the moment it is a research project to determine the possibilities of the Ruby API.

Here’s an introduction video of SketchUp developer Mark Limber talking about some of the possible ways to extend the software with the Ruby API.

An intern for this project is very much welcome…….