Volt Introduction and Docs


Edit your Gemfile to specify Ruby version, e.g.

source 'https://rubygems.org'

ruby "2.1.3" # specify a Ruby version

gem 'volt', ~> '0.9.0'

Add a Procfile that uses Thin

web: bundle exec thin start -p $PORT -e $RACK_ENV

Set up your data store connection in config/app.rb. Below you see an example for MongoHQ. You'll need to adapt for your provider. MongoLab is a great free solution.

config.db_driver = 'mongo'
config.db_name = (config.app_name + '_' + Volt.env.to_s)

if ENV['MONGOLAB_URI'].present?
  config.db_uri = ENV['MONGOLAB_URI'] # you will have to set this on heroku
  config.db_host = 'localhost'
  config.db_port = 27017