Getting Heroku, memcached and Rails 3 working
Mon Sep 13 02:41:29 -0700 2010
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
Told you it was short.
blogLater
Mikel
Leave a Reply
Latest posts
- Encrypting Another Partition Using FileVault 2 on OSX Lion
- Installing Home Folder on Second Drive on OSX Lion
- undefined local variable or method `version_requirements'
- A New World of Resources
- Rails Static Pages
- Twitter Replacing Rails? So?
- Engine Yard Cloud Backups Generating Zero Length Backups
- Our Rails Rumble Entry - StillAlive.com
- Renaming a controller and redirection in Rails 3
- Updating RailsPlugins.org to Rails 3 - Part 1
- A new protocol for social interaction
- What is a distributed social network?
- Bundler and Public Git Sources
- Why Bundler?
- Rails Commit Access
- Introducing TellThemWhen
- rake RSpec & Cucumber uninitialized constant Rails::Boot::Bundler
- This Relationship is Worth Nothing
- Thank YOU...
- Inline Attachments for ActionMailer
- Upgrading RailsPlugins.org to Rails 3 - Part 1
- Stripping dollar signs and commas from a string
- Getting Rails 3 Edge with jQuery, RSpec and Cucumber using RVM
- Action Mailer, go Proc thyself
- The Real News Donation Drive
- ActionMailer ScreenCast and Article
- Installing RSpec for Rails 3
- I am speaking at RailsConf 2010
- Rails 3 Session Secret and Session Store
- If you're lazy and you know it write your specs!
- Bundler - uninitialized constant ActionController
- Bundle Me Some Sanity
- How to use Mail / ActionMailer 3 with GMail SMTP
- Put your mailer where the action is!
- Why Force a Choice?
- How to make an RSS feed in Rails
- Rails 3 Routing with Rack
- Bundle me some Rails
- Helping out in Haiti
- Watch your self
- Is Rails 3.0 a Game Changer?
- Where did the scripts go?
- validates :rails_3, :awesome => true
- New Rails Version 3.0 Guides Online
- New ActionMailer API in Rails 3.0
- Mail gem version 2 released
- How to rename a Rails 3 Application
- Rails 3.0 Examples
- DECCA Driving Day
Latest comments
- Quantspring.com
This is a really great post I f...
- Maxine
Maybe it has a connection with ...
- Axel W
Had the same problem lots of ti...
- cloud computing anbieter
I was there and I see you confe...
- cloud computing anbieter
I was there and I see you confe...
Categories
Tag Cloud
AJAX ARGH! ActiveRecord Ajax Apache Apple Asterisk Australia Copy Database Development Feedburner Gem server Google Human Rights Javascript L. Ron Hubbard MS SQL Server MacOSX Mail Mephisto Not Programming OpenBSD Opensource Performance Personal Integrity PostgreSQL Programming Prototype Puzzle RDoc REST RESTful Rails RSPec RSpec Rails Rails Tips Rspec Ruby Ruby on Rails Ruby on Rails Tips Ruby on rails Tips SQL SQLServer SVN Scientologist Scientology Site Stats Soekris Soekris net5501 TMail Textmate Tips Windows World about mikel anti drug apache contributing daemon documentation drugs illustrator javascript lambda mail mephisto newspapers nitro open source opensource photoshop productivity programming railscasts rspec ruby ruby on rails rubyforge scientology seo sitemap sqlserver tips tmail tom cruise unix tricks vector graphicsArchives
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
- August 2009 (0)
- July 2009 (1)
- June 2009 (0)
- May 2009 (1)
- April 2009 (0)
- March 2009 (0)
- February 2009 (0)
- January 2009 (2)
- December 2008 (0)
- November 2008 (5)
- October 2008 (0)
- September 2008 (1)
- August 2008 (0)
- July 2008 (2)
- June 2008 (13)
- May 2008 (7)
- April 2008 (18)
- March 2008 (8)
- February 2008 (5)
- January 2008 (7)
- December 2007 (20)
- November 2007 (22)




Tue Oct 12 11:17:38 -0700 2010
I actually had to define the config.cache_store = :mem_cache_store, Memcached::Rails.new inside my config/environments/production.rb to get this to work.
Tue Oct 12 11:17:47 -0700 2010
I actually had to define the config.cache_store = :mem_cache_store, Memcached::Rails.new inside my config/environments/production.rb to get this to work.
Tue Nov 08 19:36:43 -0800 2011
Helpful note: memcached-northscale doesn’t work with Ruby 1.9.2. And since Rails3 is unstable on Ruby 1.9.1, you’re probably going to have to go with 1.8.7
Sun Oct 24 17:29:15 -0700 2010
@W. Andrew: I couldn’t get dalli to work on Heroku without explicitly specifying the memcached server environment variable in the config line like this:
config.cache_store = :dalli_store, ENV[‘MEMCACHE_SERVERS’]
Props go to http://arailsdemo.com for pointing that out to me after some frustrating and futile debugging.
Fri Nov 05 09:13:25 -0700 2010
Helpful note: memcached-northscale doesn’t work with Ruby 1.9.2. And since Rails3 is unstable on Ruby 1.9.1, you’re probably going to have to go with 1.8.7
Fri Nov 12 23:27:02 -0800 2010
Agreed, memcached-northscale is still busted in 1.9.2. Thanks to W. Andrew for the dalli suggestion. That worked as a great alternative.
Mon Sep 13 10:30:58 -0700 2010
Better yet, use dalli. It is considerably easier to hook for monitor and fast enough for all but the most demanding apps (uses the binary protocol but implemented entirely in Ruby).
http://github.com/mperham/dalli
gem ‘dalli’
config.cache_store = :dalli_store
Wed May 16 02:42:16 -0700 2012
This blog is providing beautiful news about the Liberian Educational Sector. It is nice to know about it this is useful information. And such blogs makes us familiar with the whole world.
Wed May 16 02:42:52 -0700 2012
This blog is providing beautiful news about the Liberian Educational Sector. It is nice to know about it this is useful information. And such blogs makes us familiar with the whole world.
Wed May 16 02:43:12 -0700 2012
This blog is providing beautiful news about the Liberian Educational Sector.
Sun Feb 05 20:23:38 -0800 2012
Helpful note: memcached-northscale doesn’t work with Ruby 1.9.2.why am i always tired And since Rails3 is unstable on Ruby 1.9.1, you’re probably going to have to go with 1.8.7 Fatigue Symptoms
Mon Feb 27 23:13:48 -0800 2012
Wonderful web site. Plenty of helpful information here. I am sending it to a few friends ans also sharing in delicious.
Mon Feb 27 23:46:01 -0800 2012
I’m impressed. You’re truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I’m saving this for future use.
Mon Feb 27 23:46:53 -0800 2012
I’m impressed. You’re truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I’m saving this for future use.
Wed Feb 29 00:56:19 -0800 2012
Well for Php ruby rails is of great use and it is mostly preferable to use this code.
Wed Feb 29 20:35:17 -0800 2012
Agreed, memcached-northscale is still busted in 1.9.2. Thanks to How to Get Scholarships W. Andrew for the dalli suggestion. That worked as a great alternative.
Wed Mar 07 23:44:57 -0800 2012
This is really a great post. I have been wasting my time among different blogs, but thanks to writer who has solved my problem here.
Sun Mar 11 04:39:15 -0700 2012
And since Rails3 is unstable on Ruby 1.9.1, you’re probably going to have to go with 1.8.7, thanks for sharing
Thu Mar 22 06:03:34 -0700 2012
Its a wonderful post and also informative. I would like to thank you for sharing this information. Thanks for sharing Security Companies Slough | Security Companies St Albans | Security Companies London | Security Companies Crawley | Security Companies St Davids | Car parts Birmingham
Wed Apr 18 01:10:24 -0700 2012
I always love to make addition to my knowledge and this one really fulfils my need. I just want to comment on the post. Its too loud. More power to your blog.