Is there a Ruby / Rails library in which I can generate word clouds (the output should be an image file), for example, in Wordle.net ?
Why should it be a Ruby / Rails library?
You can use JQCloud , which is a good jQuery plugin for creating word and tag clouds.
Have you seen the heatmap ? There's also a good blog post explaining this:
http://www.idolhands.com/ruby-on-rails/guides-tips-and-tutorials/creating-a-heatmap-or-tag-cloud-in-rails