- Slides
- Exercise files (disguised as tests)
Make sure that MongoDB 2.x is installed and running, and run:
bundle install
ruby mongo_wrapper.rb
mongo
If your database is properly started, you will now be in the MongoDB shell. Now, within the shell, try the following commands to ensure the data is seeding properly:
> use mongo_ruby_demo;
switched to db mongo_ruby_demo
> db.users.count();
10
Great! You can take a look through mongo_wrapper.rb
to get a sense of how the database is being populated. Now, we want to work through our exercises in the tests/
directory - look for the TODO
s. Start up Guard to have them run automatically when you modify any Ruby files:
bundle exec guard
Now have at it! You can also check out the complete versions, if you need a reference.