Skip to content

Instantly share code, notes, and snippets.

@kagemusha
Created December 7, 2011 18:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kagemusha/1444076 to your computer and use it in GitHub Desktop.
Save kagemusha/1444076 to your computer and use it in GitHub Desktop.
Install Rails 3.1 Mongoid Mongo on Heroku
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