Using RVM to install REE 1.8.7-2009.10

I’m trying out Ruby Version Manager this week, and my first impression is that this is some cool technology. But I wasn’t able to figure out how to get it to install an older version of REE to get around this bug (the “Marshal.load reentered at marshal_load” issue).

Igor P’s solution is correct (just install REE 1.8.7-2009.10), but it took a little fiddling to figure out how to get RVM to use the older version of REE. Here’s how to do it:

Ubuntu 9.10 (Jaunty Jackalope) upgrade notes

Once again Ubuntu Linux proves itself to be easy to upgrade. Going from 9.04 to 9.10 (one release newer, since their numbering is bsaed on dates) was easy, but included the standard sprinkling of manual re-customization that I’ve come to expect from Debian based systems.
Continue reading “Ubuntu 9.10 (Jaunty Jackalope) upgrade notes”

Tidier HTTP error responses in Rails controllers

Rails provides some flexible and fairly short controller methods for responding with an HTTP error code. Given that controllers are complicated enough by nature, I’m always looking for ways to DRY them up and make the code easy to understand. So here are some controller methods that make it really easy to provide correct HTTP error responses to clients.
Continue reading “Tidier HTTP error responses in Rails controllers”

Proper Error Handling in Rails Controllers

Rails controllers can get out of hand if you’re not very careful. Skinny Controller Fat Model is a great start. But what about handling errors? Isn’t it enough to just let Rails catch your exception and show a 500 Server Error page?

No, it’s not. Falling back on 500 Server Error for everything outside of the “happy path” through your code is sloppy coding.
Continue reading “Proper Error Handling in Rails Controllers”