Menu

Articles

This is a collection of articles I wrote over the last couple of years. These days, I usually write about building and launching software products.

When testing helper methods that use Rails’ output buffer (for example by calling concat) with RSpec, be sure to add this to your specs:

before (:each) do
  helper.output_buffer = ""
end

Took me a while to figure this one out. Apparently RSpec doesn’t initialize the output buffer and you end up with a NoMethodError on nil.

Read more

I’m currently building a tool to help managing severals servers simultaneously for Softvision Media. As I decided to write the tool in Ruby, I’ve been looking for a framework to create command-line executables. On GitHub I stumbled over commander by TJ Holowaychuk of VisionMedia that provides a simple DSL for this task. It integrates with OptionParser and the Highline gem for user interaction. It...

Read more

Yesterday I decided to give Phusion Passenger aka mod_rails a try and installed it. It was dead simple to set it up and to deploy rails applications with it. I’m now using it for several “small” applications, for which the whole overhead of setting up a cluster of mongrels and a proxy doesn’t seem to be adequate. I’ll give you a short summary on how to install mod_rails for apache2 on Debian Etch.

Read more

Script.aculo.us includes a nice effect called Effect.DropOut, which let’s the element fall in an “invisible trap” underneath. Surprisingly there isn’t an opposite effect. Calling Effect.DropOut with Effect.Transitions.reverse as transition, doesn’t work either. So what to do? Effect.Emerge to the rescue!

Effect.Emerge = function(element) {
  element = $(element);
  var oldStyle = {
    top: element
Read more