kblake/mongoid-starter-app
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Simple Rails App Starter using mongoid (https://github.com/durran/mongoid). Mostly for reference. Mongodb setup: 1. brew install mongodb 2. put mongo binaries in path a) /usr/local/Cellar/mongodb/1.1.4-x86_64/bin 3. start server a) mongod --dbpath /some/non/root/path b) on my system I use mongod --dbpath ~/data/db 4. start mongo client and play a) mongo b) http://try.mongodb.org/ Initial Data: >> script/console >> User.create(:name => "Karmen") >> User.create(:name => "Blake") ... Files of note (mongo/mongoid-specific): - app/models/user.rb - config/mongoid.yml - config/initializers/mongo.rb