Sunday, February 20, 2011

Getting Heroku, memcached and Rails 3 working


The docs for Heroku and memecached do not cover Rails 3. So here is the short version:
In your Gemfile:
group :production do
gem "memcache-client"
gem 'memcached-northscale', :require => 'memcached'
end
In your environment.rb:
config.cache_store = :mem_cache_store, Memcached::Rails.new
Told you it was short.
Oh, and remember to install the memcached add on to your app:
heroku addons:add memcache:5mb

No comments:

Post a Comment