Skip to content


Creating smaller images in Rmagick

When you create an image in Rmagick and save it, chances are high that your image will be way too big. The reason is that, by default, Rmagick creates uncompressed images. Try to run ‘optipng ‘ for PNG or ‘jpegoptim –strip-all ‘ for JPG on your file, and you will probably see a file size reduction of 20% – 90%. That is without loosing image quality!

One way to improve on this is to set the compression level in Rmagick’s write method. Here is some clunky code to do this:

Read more

Posted in Ruby on Rails.


Printing the page content in Capybara

Capybara is a great integration testing framework that easily replaces Webrat. Plus, it works with Rails 3, which Webrat seems not to do.

If you need to print the current page’s content, for example to debug your test, you can do so with:

Read more

Posted in Ruby on Rails.


Ruby on Rails: Fix for ‘invalid multibyte char (US-ASCII)’

You probably got this error message in Ruby on Rails:

/Users/stefan/.../controllers/categories_controller.rb:37: invalid multibyte char (US-ASCII)

The problem is that Ruby 1.9 expects you to use ASCII characters in your source code, and you have used a non ASCII character.

The solution is to tell Ruby that your source file is UTF-8 by including this directive as the first line of your file:

Read more

Posted in Ruby on Rails.


Rails Plugin for Single Sign On with Atlassian Crowd

Atlassian Crowd (http://www.atlassian.com/software/crowd/) offers a simple solution for single sign on. It comes with an authentication server, a web based administration console and Java client libraries. Other Atlassian products such as Jira, Confluence and Bamboo  integrate with Crowd.

With the crowd_rails plugin, Ruby on Rails can also benefit from single sign on with Atlassian Crowd 2.0.

Read more

Posted in Ruby on Rails.


Version 0.5.10 of Crowd Gem Released

The new version 0.5.10 of the crowd-stefanwille fixes a bug in handling of validation factors.

Correct handling of validation factors is necessary for interoperable single sign on with other Atlassian products.

Posted in Other.


Ruby Gem for Crowd 2

I took the Ruby client gem for Atlassian Crowd 1.6 from http://liff.github.com/crowd and updated it for Crowd 2. Also I added a new demo script that makes it easier to get started.  Tested with Crowd 2.0.5.

Get it via

gem install crowd-stefanwille

Get more info from http://github.com/stefanwille/crowd.

Posted in Other.


Why ‘bundle install’ is slow (and how to make it fast)

I use Bundler’s command bundle install with Capistrano and it used to takes many seconds to complete. The reason was that Bundler fetched all required gems unless they were already installed and then checked for all dependent gems if there is are newer versions available and installed these. It’s the last step that took so long.

Read more

Posted in Ruby on Rails.


Why You Should Split Your Epics Into Smaller User Stories

Probably every agile book recommends to split large user stories (epics) into smaller ones. But why? The reason is usually ‘because they are more manageable’, but I didn’t really understand what that was supposed to mean. Until recently, when we worked on two epics. And I had an insight that I am eager to share.

Read more

Posted in Agile.


Let Business People Get Their Statistics Themselves

I found that, once you have a productive software, your business people ask for numbers, statistics and reports from your database, on a weekly or monthly basis. And this keeps interrupting your workflow. And it also keeps you from coding. So what to do?

Read more

Posted in Agile.


Looking for Ruby on Rails Developer for Balao in Hamburg

I am searching for a new colleague: A sharp, experienced Ruby on Rails developer for our internet startup Balao in Hamburg. See this.

Our company offers an internet service called GratisPay that monetarizes virtual goods in online games.

Update: Finished searching

Posted in Ruby on Rails.