Integer vs to_i in Ruby

Since this has recently come up in a work context, I would like to take this opportunity to remind everyone to always specify the expected base when trying to convert strings to integers using Integer(value), because as opposed to String#to_i, the Integer(…) constructor does honor prefixes like 0 for octal, 0x for hexadecimal, etc.

Example: more…

bundler exit status codes

For everyone who keeps having to google for the meanings of bundler exit status codes and finding vague StackOverflow posts, here is the list of all defined bundler exit codes, straight from the source.

Don't worry, use Happy!

I’m all excited. Happy is a-go! Only version 0.1.0, but at least it’s not a pre anymore. Hold on, I’m getting ahead of myself.

Happy is a new Ruby web application framework by Hendrik Mans. Originally developed for, it was extracted from that into a standalone gem, filling the niche between Ruby on Rails, the 800-pound gorilla in the room, and Sinatra, the rather … more…

Managing multiple mod_passenger standalone configurations

If you’re deploying multiple Ruby/Rails apps with passenger, you might end up with different ruby version requirements. Or maybe you want to keep gemsets separate. For whatever reason, you end up running one or more of your apps in a standalone passenger server and proxying them through Apache or nginx.

Or maybe you’re doing mass webhosting with only passenger standalone instances. Whatever floats your boat. more…

Fighting frameworks

Rant time!

So, back when I was still doing PHP, the story went like this: “We have this kinda okay framework which is documented okay and there are almost no plugins or contributions, so you’re on your own, and if things don’t work, well, you’re screwed, enjoy digging in the depths of the ‘magic’ code.” As soon as you try to do something the framework creators … more…

Rewriting Favcharts - Part 1

Um in Form zu bleiben, widme ich möglichst jeden Tag 30-90 Minuten Nebenprojekten.

Diese Woche baue ich die favcharts neu. Die momentante Implementation der favcharts ist ein Haufen von “Hacks upon hacks”, weil die Charts aus einem Satz hastig programmierter Scripte und viel Zeitdruck entstanden sind. Es funktioniert irgendwie, aber so richtig super ist es nicht. Ein Rewrite ist schon seit einiger Zeit überfällig, jetzt ist … more…