Skip to content

Instantly share code, notes, and snippets.

@MarkoZabcic
Forked from bscofield/gist:181842
Created September 18, 2010 13:46
Show Gist options
  • Save MarkoZabcic/585687 to your computer and use it in GitHub Desktop.
Save MarkoZabcic/585687 to your computer and use it in GitHub Desktop.
# mongo_template.rb
# MongoDB FTW!
db_name = ask('What should I call the database? ')
initializer 'database.rb', <<-CODE
MongoMapper.database = "#{db_name}-\#{Rails.env}"
CODE
file 'config/database.yml', <<-CODE
# Using MongoDB
CODE
environment 'config.frameworks -= [:active_record]'
gem 'mongomapper'
# source control
file '.gitignore', <<-FILES
.DS_Store
**/.DS_Store
log/*
tmp/*
tmp/**/*
config/database.yml
coverage/*
coverage/**/*
FILES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment