At Codebits I had some problems configuring a Sinatra application to use MongoDB with the Mongoid ORM. And then I had some other problems deploying it on Heroku with the MongoHQ add-on.

Eventually I got it all working smoothly. To avoid going through the hassle again, I uploaded to GitHub a template application which works out of the box with the above configuration. Looking at it now, it looks pretty straightforward, and I can’t remember what the issues were. But it might save some time to someone else.

Sinatra Mongoid App