This document contains the steps to create a mongo-enabled Rails 3.1 application. This is just for personal reference actually.
We have to skip the Active Record stuff:
rails new app_name --skip-active-record
Add mongo and bson_ext to the Gemfile