Thursday, November 11, 2010

Candy OM for MongoDB and ruby - FAIL

Previous: Success with rvm and ruby 1.9.2

Installing Candy and incorporating it with my experimental Sinatra project consisted of doing an rvm install:
rvm gem install candy
and updating the Gemfile with
gem "candy", :require => "candy"
Easy and clean.

Unfortunately, I had no luck at all trying to run the basic Person class example given in the readme, or the Zagnut example, or indeed any other variations I attempted, whether standalone or integrated with the sinatra app. After about four hours of trying, I posted some encouragement on the candy discussion forum and expressed the hope that it will become functional soon. I plan to check back in a couple of months to see if it's working yet. I hope the author will continue working on it, because it's a good concept. (To be fair, he does warn that candy is in an alpha-alpha state.)

Candy has, at least, provided the inspiration I needed to work through the difficulties I was having with installing rvm and ruby 1.9.2. Those bits are now installed and working well. For the moment, I think I'll try to keep going without an object mapper and see how tedious that proves to be. That's probably better for the purpose of learning MongoDB well, anyway. MongoDB has a pretty straightforward API, and it may be sufficient just to wrap persistence logic in a helper class. That way, if I decide to move to an object mapper it should be possible to replace the persistence logic without affecting the rest of the code.

Next: Ripping CDs on Ubuntu 10.04

No comments:

Post a Comment