01 February 2014 by Ralph von der Heyden

Introduction to strace

Thinking that you have pretty profound UNIX knowledge? Think again if you don't know how to strace. This introduction to strace by Chad Fowler finally persuaded me to check out this little UNIX tool. I made several attempts in the past, but each time I attached it to a running

Read more
12 January 2012 by Ralph von der Heyden on rails

Why I roll my own authentication

This is what got me started writing this post: In the Rails world, we are holding up the DRY principle high. One outcome of this is that people do put stuff that has to be done for many applications into gems, to be reused. Authentication is such a case, as

Read more
02 December 2011 by Ralph von der Heyden on rails | ruby

Classes are separations of concerns or why too much magic hurts

I am currently working on a project that requires me to scope nearly all database queries by customer_id, because, you probably get the idea, each and every customer has its own set of data. Furthermore, the Customer class does not inherit from ActiveRecord::Base, nor is it an ActiveModel

Read more
01 December 2011 by Ralph von der Heyden on rails | ruby

Splitting your Rails classes into modules: How does it work?

We all like the "Fat models, skinny controllers"-rule, but what to do if your models are becoming too fat? Split them up into smaller chunks, exactly. Of course this technique works for other classes, too. The first thing to do, is to check whether the module you're looking at

Read more
01 November 2011 by Ralph von der Heyden on ruby

Enabling debugger support in ruby-1.9.3-p0 with RVM

Forget what you read here before, and just do the following: curl -O http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/linecache19-0.5.13.gem curl -O http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/ruby-debug-base19-0.11.26.gem gem install {linecache19-0.5.13.gem,ruby-debug-base19-0.11.26.gem} \ --

Read more