Finally! After many weeks I managed to track down a very strange bug. When parsing RSS feeds using Ruby’s built-in RSS::Parser, sometimes I would get bombs in Rails when trying to insert item.pubDate into the database.
Category Archives: ruby
Installing RMagick on OS X
It is what Muad’dib said: “fear is the mind-killer” (full quote below). Oh I feared installing RMagick on OS X. The fear nearly paralyzed me (well not really). Turns out I had nothing to fear.
Improvements to `char` in Ruby 1.9
The new version of the Ruby language brings improvements to characters. There is no `char` concept per se (which is fine), but the implementation now makes a lot more sense.
Ruby 1.9's charsets FTW
I come from a Java background. With all it’s flaws, Java’s support for character sets is very good. All literal strings are UTF-8 and source files can be ASCII, iso or utf as well. Ruby 1.8 is only so-so and the earliest versions of Rails with their iso-8859-1 default were not helpful too. Fortunately the upcoming 1.9 release of Ruby will make things right with a vengeance.
Sweeter unit tests in Rails 2.0
I have only just now discovered a sweet new feature of Rails 2.0. Unit and functional tests have gotten a lot sweeter. I can now subclass ActionController::TestCase and do away with all the setup cruft that used to be there. Sweet! Continue reading
Importing email contacts in Ruby
I have just blogged about a Ruby tool I am using to import email contacts. It works great, if you are programming in Ruby I really recommend it.
Mongrel: the cat's out of the bag
Allrighty! The cat is out of the bag. Zed Shaw, creater of the Mongrel web server, has finally snapped! He’s always been a funny sort of guy, and I really do appreciate his style. Also, Mongrel is a fantastic web server even though I am using LiteSpeed myself. Anywho. Check out this rant from good ole Zed. Ouch! Brutal!
Send spammers to Goatse with dnsbl_check
Brilliant post about a tweaked dnsbl_check by Shanti.
LiteSpeed and Capistrano
I am leet. No wait, I think I am.
I think I am leet and therefore I do not have to read stinking manuals.
Ruby's lousy garbage collection
The rumours are true. Screw it they’re not rumours any more. It’s a cold hard fact: Ruby’s garbage collection doesn’t really work all that well.
Continue reading