Skip to content

Instantly share code, notes, and snippets.

@mikedijkstra
Created June 15, 2011 23:31
Show Gist options
  • Save mikedijkstra/1028393 to your computer and use it in GitHub Desktop.
Save mikedijkstra/1028393 to your computer and use it in GitHub Desktop.
New rails app using Mongoid
Create a new rails app
$ rails new [app_name]
Update your gem file to include mongoid and bson_ext
gem 'mongoid'
gem 'bson_ext'
Move into your new rails app directory and run the bundle command
cd [app_name]
$ bundle
Create a mongoid config yaml file
$ rails g mongoid:config
Generate a new scaffold for your app
$ rails g scaffold article name:string content:string
Fire up your rails server
$ rails s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment