Skip to content

Instantly share code, notes, and snippets.

@thedanotto
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedanotto/ee6cbbe9074640f50e30 to your computer and use it in GitHub Desktop.
Save thedanotto/ee6cbbe9074640f50e30 to your computer and use it in GitHub Desktop.
Mongodb Rails App
# 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