Skip to content

Instantly share code, notes, and snippets.

@vwall
Forked from kagemusha/gist:1444076
Created January 6, 2012 20:14
Show Gist options
  • Save vwall/1572207 to your computer and use it in GitHub Desktop.
Save vwall/1572207 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