Installing PostgreSQL 8.3 on Leopard

This is the documented path to my discovery of PostgreSQL 8.3, which I’ve never used before. Now that MySQL‘s community is getting hammered to death by Sun, and thanks to all the good things I’ve heard about it over the years (including enhanced performance on multicore systems and greater scalability), I really wanted to install it and play with it.

Frankly, it’s not easy. At all (actually this is why I think MySQL is so popular, because of the ease of installation!) So hang tight and read on. Continue reading

My first Django project

So here it is, my first Django project: the gazillionth blog engine on the planet!. As if there weren’t enough, right? :) Actually it was a practical and easy way to learn the Django project, and the result is pretty neat. Feel free to download it, play with it, and give me your feedback. Here’s a sample screenshot in Safari:

screenshot.png

Creating this project I have had a practical experience comparing both Django and, of course, Rails. The subject is not new in this blog; however, this time I could play with both frameworks and as such, I can bring my small amount of confusion in this big framework tar pit. Continue reading

Updating RubyGems and Rails in Leopard

If you just installed Leopard and the developer tools, you’ll find out that Ruby on Rails is there, ready to be used. But of course, it’s Rails 1.2.3, which is fine, but it turns out that last Friday Rails went 2.0. Not only that, but RubyGems was updated to 0.9.5 lately too… and you’re dying to have everything up and running on your system.

So how to proceed? Follow these instructions:

  1. Open Terminal.app
  2. $ sudo gem update --system
  3. $ sudo gem install rails
  4. $ sudo gem update

If you just do “gem update”, then the current Rails installation will be broken. You must do ‘gem install rails” (which seems odd, because it was already installed, after all). The thing is that since you’ve updated RubyGems with the command 2) above, then you need to re-install Rails. I haven’t tried with other gems, but it could be the same situation for them.

Update, 2007-12-19: Here’s another solution for this problem!

Blog coverage for Paris on Rails 2007

I found the following articles about Paris on Rails 2007:

I will add more links as I find them; and don’t hesitate to add yours in the comment section below!

Paris on Rails: Afternoon

(See the morning report, if you haven’t already)

After the lunch break, these were the highlights of Paris on Rails:

  1. Christophe Porteneuve talked about Prototype, the project where he is one of the core developers, and also author of THE book about Prototype! Great stuff: he explained everything there’s to know about JavaScript bindings (and the Prototype “bind” method); he also gave an excellent overview of the enumeration methods of Prototype (incredible stuff!), the new Response object in the latest version of Prototype, and also a nice talk about event bubbling. JavaScript 2000%!! To sum it up: this guy is a great presenter, very funny and knowledgeable, and his speech is more than worth the trip to Paris!
  2. Sylvain Perez and Guillaume Desrat (president of Ruby France and rubyist since 2002!) enlightened us about how they introduced Rails in RBC Dexia Investor Services making it interact with their SOA, DataWarehouse and backend services, what were the challenges (some), the rewards (many) and the tradeoffs (a few) during that integration. Maybe that “Thought Leader” of James Mc Govern will finally understand that not only Rails is ready for prime time… but it is already used in big “enterprisey” environments!
  3. Alexis Moussine-Pouchkine and Jean-François Arcand gave an extremely interesting talk about JRuby, GlassFish and Java in general, and how Ruby is slowly gaining momentum in the Java world! And Jean-François made it really fun to follow thanks to his nice Canadian accent :)
  4. David Heinemeier Hansson himself direct from Chicago! He talked over the iChat link about all the new features of Rails 2.0, about backward compatibility issues and how to solve them.
  5. Finally, Jean-Michel Garnier from 21croissants (a Barcelona-based RoR company) convinced us that testing is a really important thing to do (which you already knew, by the way, isn’t it?) and how to use RSpec, rcov, CruiseControl.rb, Test::Unit and Selenium in your applications, putting it in context (historically, citing Fred Brooks and Kent Beck, and methodologically, citing Martin Fowler). As Jean-Michel said in his speech, 2008 will be the year of RSpec; and when I look at it, I think he’s right: in RSpec, the spec is the test; the spec is the doc; the doc is the spec. And the other way around, too :)

It is interesting to see some trends in the current Rails landscape:

  • There’s an interesting ongoing debate about IDEs: Aptana (ex-RadRails), NetBeans, Visual Studio or… TextMate?
  • JRuby is available in stable form: there’s a bunch of new opportunities opening right now!
  • Ruby and Rails are both getting the “acceptance status seal” of big companies: it is no longer a “toy” technology.

One thing is fundamentally true: this platform has taken the world as a storm. I’ve first blogged about it in July 2005, and I firmly believe today that any serious software developer should (at least) learn a little bit about it. Rails is here to stay, whether you like it or not. Compare my reports to what happened in Paris on Rails 2006: lots of things have happened in the Rails world, and more are bound to happen in 2008.

All in all, an excellent conference, with around 220 people attending it, from France, Switzerland, Luxembourg, Belgium and even Spain! I’d be happy to talk here next year ;)

Update, 2007-12-11: Peter Sayer, whom I met yesterday in the conference, and shared a few impressions about the current Rails landscape, has published a very good article about it!

Paris on Rails: Morning

The morning sessions of Paris on Rails can be summarized as follows:

  1. An introduction to Ruby and Rails done by Laurent Juillard from nuxos: interesting for those that never used Ruby before, and a good thing to do given the number of people in the room that are new to the platform in general. Otherwise, quite boring for those of us who already use it :) But the right thing to do nevertheless.
  2. A real-life use case of Ruby on Rails, shown by Aurélien Géron from Wifirst: a very interesting explanation of a company that chooses to jump on the Rails wagon, with answers to both the “why” and the “how”. Very funny explanation of how they had to deal with the Pythonistas inside the company who wanted to use Django instead :) The most interesting thing about this talk is the fact that they will release their webmail application as open source!
  3. Yann Lugrin, CTO of Liquid Concept (from Lausanne!) explained about the trouble to “internationalize” a Rails application (particularly about the IMHO biggest problem in Ruby: the lack of direct UTF-8 support!), and how you can use the Globalize plugin to make your sites multi-lingual and multi-cultural. I’m happy I’ve used it to make Parking Friend available in several languages :) Globalize rocks!
  4. Finally, Nicolas Mérouze from Yeastie Mobs talked about HAML as an alternative to ERB as the template language for Rails, and how it compares to other options like Markaby or DRYML or MasterView. Very interesting! HAML seems a little bit “Pythonesque” for my taste :) but that’s my opinion. Nicolas also made an interesting comment about SASS and Blueprint, which I had heard about, but never looked at in detail.

In any case, I still have trouble with the technical names and buzzwords in French :) I’m too used to the English versions! Other than that, a nice first part. Let’s see what comes in the afternoon! Now it’s time to have something to eat :)

Update: Read the afternoon report!

Rails vs. Django

While watching the Google TechTalk about Django, I came accross this interesting paper highlighting differences between Rails and Django, which might be interesting to many of us in the field.

For those interested, Django is a powerful, MVC framework for creating web applications using the Python programming language. It is very similar in some respects to Rails, but some consider Django to be better suited for high-traffic websites. I haven’t used Django extensively (nor Python as a matter of fact, besides the typical “Hello World” thingy) so I won’t say anything else but the fact that I prefer Ruby‘s syntax to Python’s.

Of course this is a subjective opinion! In any case, if it’s anything like Rails, it’s worth considering. Definitely. Dynamic languages are the way to go.

Update, 2008-01-11: You might want to check out this other article of mine!

My First Rails Plugin

I’ve just published my first Ruby on Rails plugin! As it couldn’t be otherwise, it’s called “Acts as Manifesto” (following the long tradition of “acts as” plugins in the Rails world) and you can find the project page here.

It is the simplest possible plugin, adding a generator to your Rails application. This generator allows you to create a “manifesto” and a “signature” model to your application, and as you can guess, a manifesto can have several signatures. Simple and fast way to have such a system up and running in no time.

It is hosted on Google Code, and I plan to make some adjustments to it later. Do not hesitate to post your comments here! I would love to know if you find it useful.