-
-
Save vwall/1572207 to your computer and use it in GitHub Desktop.
Install Rails 3.1 Mongoid Mongo on Heroku
This file contains 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
Tested on: Rails 3.1.x, Heroku Cedar stack | |
1. Generate/develop local Rails app, add mongoid gem, bundle install etc. | |
2. Git the App | |
3. Generate Heroku Cedar App: | |
heroku create --stack cedar | |
4. Rename app | |
heroku rename <newname> | |
5. Install heroku mongoHQ or mongolab: | |
heroku addons:add mongohq:free | |
heroku addons:add mongolab:starter | |
6. Edit mongoid.yml production settings based on heroku configs (run 'heroku config' from cmd line to see config env variables) | |
production: | |
uri: <%= ENV['MONGOHQ_URL'] %> #for mongohq | |
#uri: <%= ENV['MONGOLAB_URI'] %> #for mongolab | |
Refs: | |
http://devcenter.heroku.com/articles/rails3 | |
http://devcenter.heroku.com/articles/mongolab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment