Skip to content

Instantly share code, notes, and snippets.

@randika
Created November 7, 2011 12:38
Show Gist options
  • Save randika/1344834 to your computer and use it in GitHub Desktop.
Save randika/1344834 to your computer and use it in GitHub Desktop.
Deploy rails3.1 App to Heroku Cedar
###How to deploy rails 3.1 app on heroku Cedar stack
Gem configuration
==============================
1) On your Gem file move the default sqlite3 gem config to development group and add PosgreSQL
group :production do
# gems specifically for Heroku go here
gem "pg"
end
group :development, :test do
gem 'sqlite3'
end
2) Bundle install with this line - (for me just "bundle install" didn't work on production)
bundle install --without production
Assets configuration
==============================
2) Enable this line on application.rb
# If you want your assets lazily compiled in production, use this line
Bundler.require(:default, :assets, Rails.env)
3) On production.rb set the compile to true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
Deploy to Heroku Cedar stack (This is for rails 3.1 apps)
============================================================
heroku create <yourappname> --stack cedar
git push heroku push master
And your app will be here: <yourappname>.herokuapp.com (Note its not heroku.com)
Hope this will help someone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment