Last active
August 29, 2015 14:15
-
-
Save thedanotto/ee6cbbe9074640f50e30 to your computer and use it in GitHub Desktop.
Mongodb Rails App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you have mongodb installed | |
brew install mongodb | |
# in your first terminal tab you need to start mongodb... so run the following command in terminal | |
mongod | |
#open a second terminal tab | |
rails new mongo_test --skip-active-record | |
cd mongo_test | |
# edit Gemfile | |
gem 'mongoid' | |
#run bundle | |
bundle install | |
# edit config file... | |
config/application.rb | |
change line 15 to... | |
Bundler.require(*Rails.groups(assets: %w(development test))) | |
rails g mongoid:config | |
rails g scaffold Person name | |
rails s | |
# and it should work.... http://localhost:3000/people/new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment