Hi guys, We’re posting this one right at ya from Arrrrcamp 2011 in Ghent. Arrrrcamp is one of the best known RoR events in Belgium. An event Kabisa is a proud sponsor of. Our crew is sitting in the sessions and we’ll report in this post after each event. John W Long – Design workflow for Rails [...]
Kabisa at #arrrrcamp 2011
October 7th, 2011Custom Array#uniq for ActiveRecord results
June 3rd, 2011You may be aware of the uniq method in Ruby: [1,2,3,4,4,6,2].uniq => [1,2,3,4,6] This does not work for arrays of ActiveRecord objects, especially if you want uniqueness on a arbitrary property. Here’s a snippet that allows you to uniquify an Array using an arbitrary property: Hash[*arrayname.map {|obj| [obj.name, obj]}.flatten].values Basically you create a new Hash, [...]
“No architectures to compile” in Xcode 4
June 3rd, 2011XCode 4 has a new, improved project structure. But sometimes, when you open an older project format (like XCode 3) you’ll face a little challenge before you can get to coding again.
Xcode4: Attaching to MyApp
May 24th, 2011Today I imported an iOS project, originally written in Xcode3 into Xcode4. I ran into an issue that prevented me from debugging the app both in the iOS Simulator and on my own iPhone 4. When hitting ‘Run’, all Xcode would do is show the message “Attaching to MyApp”. The simulator and my iPhone both [...]
Long running migrations? Use the right tool for the job!
May 19th, 2011Rails migrations are awesome, even for updating data after a migration to keep everything consistent. Arguably, you should not update data in migrations, but it is useful in some scenarios. If done incorrectly, however, data migrations can take a long time, causing unnecessary downtime of your application.
Share sessions between Rails 2 and Rails 3 applications
October 27th, 2010This week we started building a Rails 3 application for one of our customers which had to share data with their existing Rails applications, which were built with version 2.1.2 and 2.3.8. Although session configuration differs from version 2 to 3, getting this done wasn’t such a hard job, mainly thanks to this blogpost written [...]
Handle CMYK colorspace uploads with Paperclip
June 17th, 2010When saving images in general, and JPEG in particular, a colorspace is used. The two most commonly used colorspaces are RGB and CMYK. RGB is used for screens (e.g. television, monitors, phones). Screens work by combining different light colors (red, green or blue) into one color we can actually see. CMYK is used in print [...]
Dynamic Queue Assignment for Resque Jobs
March 16th, 2010Resque is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later. Sounds great! Let’s dive in directly: class Archive @queue = :file_serve def self.perform(repo_id, branch = ‘master’) repo = Repository.find(repo_id) repo.create_archive(branch) end end Resque.enqueue(Archive, @repo.id) This example was taken from the Resque README. It works [...]
Setup a self-signed SSL site with Apache2
March 8th, 2010Some things need to be secure. Login and registration pages are often among them. This guide will show you how to quickly set-up a SSL site with a self-signed certificate and automatic HTTP-to-HTTPS redirect. This is ideal for setting up staging environments. I’ll assume you have a standard Debian system with the apache2 package installed [...]

