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

The CARB stack: Coffee + Angular + Rails + Bower

AngularJS is a great way to build modern web apps and this affects Rails programmers. The combination of both is an excellent choice: Build your single-page app in Angular and let it communicate via JSON with your Rails-API backend (btw, this is exactly what we did for palava). However, you might ask yourself, what the best way to combine Angular and Rails is. Should you use the JavaScript tools world (grunt, yoeman, etc.) or should you prefer the Ruby tools (thor, sprockets)?

…read

ActiveSupport 4 by Example: Numeric#to_s

The NumberHelper functionality is now available as Numeric#to_s

…read

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!

…read

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 :)

…read

♥ .railsrc / rails console snippets

13 Rails-specific hints for your rails 3 console.

…read

The has_many_booleans Rails plugin

has_many_booleans is an ActiveRecord plugin which creates virtual boolean attributes for a model. When the object gets saved, the plugin transforms all attributes into a single integer, using a bitset. So you can easily add new attributes without changing the database structure.

…read

Upgrading to Rails 3: Obstacles and helper scripts

Transferring an existing project to Rails 3 is not that hard, but it usually cannot be done in 5 minutes.

…read

RubyBuntu -4- Make gedit better than any IDE ;)

You can, of course, use an IDE for coding – but reconsider it: After hours of initialization, it tries to do everything for you… Somewhere in the never ending menu jungle… And you need to click all the time… Stop! Focus on the gist! You want to write code!

…read

RubyBuntu -1- Installing Ruby (and Rails) on ubuntu

Installing Ruby/Rails on ubuntu is not hard, but some little obstacles might be confusing.

…read

Organise your code comments with rake notes:todo!

Lots of IDEs (e.g. Netbeans) and some editors (e.g. gedit with plugins) have a nice feature: They show comments, which start with something like TODO or FIXME. Those annotations are quickly written and they make it harder to forget some things you wanted to (or have to) do.

I have just discovered that Rails has this feature already built-in!

…read

Rack::NoTags

This is my submission for the CodeRack contest:

A middleware that removes < and > from all incoming requests.

…read

Troubleshooting an aegis-permission problem

In my current Rails project, I use the aegis gem for rights management. And I almost got mad, wondering, why it wouldn’t work..

…read

PlasmaRails.org

plasmarails.org

PlasmaRails.org is an online RDoc for Edge Rails, which is regenerated every day. It is based on sdoc with some custom css.

Update 06.06.2010: Relaunched with better stylesheets!

…read

Create an offline version of the Ruby docs

When I began programming Ruby/Rails, I quickly found the online Ruby documentation at ruby-doc.org and the Rails API, which are both very useful. But unfortunately, one cannot be always online. In this blog post, I’ll demonstrate some ways to generate or get the docs offline and some hints on using them.

…read