Subscribe to RSS

Author Archives: Ariejan de Vroom

Zoek jij ‘n uitdagende baan??

First off, sorry to all the English-reading people, but this post is intended for my Dutch audience.
Even wat updates voor mijn Nederlandstalige publiek. Ik heb wat nieuwtjes voor jullie, dus lees snel verder!
Allereerst wil ik even melden dat ik a.s. dinsdag (10 juni) te vinden zal zijn op RubyEnRails 2008. Dus, ben jij er ook, [...]

The best IT books hand-picked for you!

Are you ready to dive into Rails? Want to familiarize yourself with the deeper dungeons of Ruby? Are you an aspiring game developer? Or maybe you just want to learn how to use Git or Subversion effectively?
In any case, I’ve opened up a little book shop with a hand-picked selection of books on a [...]

The migration that cannot be undone: Irreversible Migration

Migrations have up and down methods, as we all know. But in some cases, your up method does things you can’t undo in your down method.
For example:

def self.up
# Change the zipcode from the current :integer to a :string type.
change_column :address, :zipcode, :string
end

Now, converting integers to strings will always work. But, [...]

How to: Compile packages on Debian/Ubuntu by hand

In some very rare situations you may find yourself in the need to recompile a Debian (or Ubuntu) package. Luckily for all of use, the great Debian packaging system makes this a piece of cake.
Let’s say we want to recompile mod_python for apache 2 to hook in to python 2.5, instead of the default [...]

GIT: Using the stash

I bet the following has happened to you: you are happily working on a project and are in the middle of something. You are not ready to commit your changes, because you your tests don’t pass yet. Then your client calls with a bug report that needs to be fixed right now. (You know how [...]

Permanently redirect WordPress pages

After my trip to Mephisto some time back, I noticed that some pages were accessible from different URLs. After moving back to WordPress, these permalinks no longer work.
I’m running WordPress with Apache2, so it shouldn’t be too hard redirect those old permalinks to their new locations. (That’s what rewriting is all about anyway).
Here [...]

Debian Etch: RMagick LoadError

If you’re on Debian Etch, you may encounter the following error

libMagickWand.so.1: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/1.8/gems/rmagick-2.3.0/lib/RMagick2.so

This basically means that the libMagickWand.so.1 file cannot be found. However, it is available on your system. All you need to do to fix it, is tell your box to look in the [...]

Enabling Trac Email notifications

If you’ve ever reported a but to Ruby on Rails, you’ll have noticed that their Trac has nice email notification feature. And I bet you want that in your Trac as well!
Now, email notification are nothing exotic. You don’t need any plugins, just an outgoing SMTP server and access to your trac.ini file.
In your [...]

Rails Snippet: Caching expensive calls

In Rails, from time to time, you may encounter you have a method you call several times, but which returns always the same result. For example, have the following:

class Person < ActiveRecord::Base
has_many :articles
 
def get_approved_articles
self.articles.find(:all, :conditions => {:approved => true}, :order => ‘approved_on DESC’)
end
end

A query is [...]

Here we go again: WordPress 2.5

Okay, here we go then. I’ve managed to drop Mephisto after only a few weeks of service.
As a Rails developer, I liked the idea of running my own blog on something Rails. However, Mephisto was a big disappointment. Especially compared to WordPress 2.5. Mephisto has been on life support for quite a while now, [...]