Fix issues with Padrino and Rubinius

This should fix issue #452.