Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Heroku extension for LocomotiveCMS
Ruby JavaScript


Heroku extension for LocomotiveCMS

This extension allows LocomotiveCMS to run on heroku


  • Heroku gem
  • Heroku app
  • Heroku API key
  • LocomotiveCMS engine


Inside your LocomotiveCMS application, open your Gemfile file and insert the following line after the one referencing LocomotiveCMS

gem 'locomotive-heroku', :require => 'locomotive/heroku'


Then, you have to let Heroku know about your API key and your application name
Modify your Locomotive config file (config/initializers/locomotive.rb) = { :target => :heroku, :api_key => '<YOUR HEROKU API KEY>', :app_name => '<MY HEROKU APP NAME>' }

Storage: Amazon S3

Because Heroku disables writing on their disk, we have to use Amazon S3 or any storage providers as long as they are supported by Carrierwave. In the following example, we will use Amazon S3 which is by far the most known/used.

Open your terminal and at the root of your application on your machine,

heroku config:add S3_KEY_ID=<your s3 key id>
heroku config:add S3_SECRET_KEY=<your s3 secret key>
heroku config:add S3_BUCKET=<your s3 bucket name>

Note: If you plan to use another storage provider, do not forget to modify the config/carrierwave.rb file accordingly.


Feel free to contact me at didier at nocoffee dot fr.

Copyright © 2013 NoCoffee, released under the MIT license

Something went wrong with that request. Please try again.