Working with Ruby
Hi, I am Jan. This is my old Ruby blog. I still post about Ruby, but I now do it on You should also install Irbtools to improve your IRB.

RubyBuntu -6- gedit 3! wtf? set it up for ruby/web development :)

So you’ve installed (or upgraded to) ubuntu 11.10 and everything looks great… Except – uh!, lots of gedit plugins are only compatible with gedit 2! But don’t be sad.. or angry.. This guide points out, how to, nevertheless, create a solid foundation that allows you getting prodcutive with gedit!


Fixing a little anchor permalinks vs. pagination issue (using javascript and jekyll)

I am using the Jekyll blog generator for some projects (still not sure if I really like it..) and came across the following requirement the other day:

  • The blog should only have an index page, no (visible) sub-posts
  • This index page should use pagination
  • There should be the ability to link to a specific blog post

The problem was: I wanted to use anchor links (https://some.url/#post-identifier), but – because of the pagination – blog posts “change” their index page (e.g. in jekyll, they move from /#example to /page2/#example).


Why you should switch to 1.9: Three Ruby 1.8 bugs

Ruby 1.8 dies in June 2012. This post shows some small examples, why this is good ;)


Pass multiple blocks to methods using named procs

My codebrawl entry (gist) got the 5th place (out of 20). Want to use it in real life :)


RubyBuntu -5- Modernize your gedit Ruby language specs!

How to get the following for your gedit:

  • Up-to-date Ruby syntax highlighting
  • Proper highlighting for .js.erb or .yml.erb files
  • Gemfile.lock highlighting

Three little tips for slimmer Rails migrations

Rails migrations are easy to understand and easy to write. However, you can save some unnecessary key strokes by applying these three tips :)


Building yet another terminal colors gem: term-ansicolor meets rainbow

There are plenty terminal color gems out there. Now, there is one more. Why?


eurucamp: Tweak your Ruby consoles - 2011 edition

Exploring the stdlib: logger

puts is great for a quick output, but when a script gets more complex or you want to offer a flexible executable, consider using the logger ;). Since the logger class is part of the Ruby standard library, it can be used everywhere, without installing any gems. And it’s very easy to use :D


♥ .railsrc / rails console snippets

13 Rails-specific hints for your rails 3 console.


Small Ruby CLI Improvements (Part 4): Edit Ruby Objects Using yaml

Somehow, I stumbled upon this useful little script by _why: Update


Small Ruby CLI Improvements (Part 3): Hirb vs. Unicode

Hirb: “A mini view framework for console/irb that’s easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu.” now supports unicode in two ways:

┌───────────────────────────────────────────┬───────────────────────────────────────────────┐ │ Support for unicode full-width characters │ Unicode table characters instead of +/- chars │ └───────────────────────────────────────────┴───────────────────────────────────────────────┘


Small Ruby CLI Improvements (Part 2): Wirb!

Many people use irb with wirble. I also did.

I’ve been quite happy with it, but sometimes I noted that some symbols were displayed as : without the symbol name (e.g. in method name arrays) and that the representation of regexes looked quite strange.

This is why I’ve looked at the wirble tokenizer, fixed some bugs, liked it, extended it and created Wirb. These are the improvements:


Small Ruby CLI Improvements (Part 1): Command-line Regex Debugging

This little method (now also available in zucker/debug) is useful for understanding and creating regexes: