Making TextMate And rvm Play Nice
After being annoyed with running multiple versions of Ruby just by using MacPorts I finally gave in and tried out rvm, the Ruby Version Manager. That stuff got even more annoying when I tried to make Bundler behave well with multiple Ruby versions, because it just doesn’t by default. It’s not really a problem with normal gems, but Bundler falls apart with its defaults when you’re trying to run gems with native extensions. Hint: Set bundle_path to include RUBY_VERSION and make some links from one cache directory to another to not have every gem cached for every Ruby version.
How To Redis
We’ve covered some good ground already, some blabber about Redis in general, and also some thoughts on when using it could be beneficial. The other big question is: How do I integrate that stuff in my application? How do I get my objects to be stored neatly in Redis?
When To Redis
A very valid question is: What’s a good use case for Redis? There’s quite a few, as Redis isn’t your every day key-value store, it allows you to keeps lists and sets in your datastore, and to run atomic operations on them, like pushing and popping elements. All that stuff is incredibly fast, as obviously your data is held in memory and only persisted to the hard disk if necessary and to top it off, asynchronously, while not reducing the throughput of the server itself.
There’s Something About Redis
I like to think that there’s never been a more exciting time when it comes to playing with new technologies. Sure, that’s a bit selfish, but that’s just how I feel. Doing Java after I got my diploma was interesting, but it wasn’t exciting. Definitely not compared to the tools that keep popping up everywhere.
The Shoulda RSpec Extravaganza
I don’t use RSpec a lot any more these days. I much prefer Shoulda, heck I even started using Rails integration tests again (using Shoulda of course), because sometimes the additional abstraction of Cucumber is just too much. Any way, there’s some things I liked about RSpec, and they were not related to the features of the testing DSL itself, but more to the tool RSpec. It has a neat formatter that’ll output the ten slowest-running tests. I also found the colored list of full test names to be very helpful.