This one took forever to work out. For the second time. If I’d written things down the first time…
Okay. First things first: the memcache gem can only install from rubygems 1.2 or lower. So visit rubygems, and download the source for the relevant version.
Second, memcached gem requires several libraries to be in place to compile against. However, only one version of the libmemcached is compatible with the mecached gem. Where did I get such a ludicrous idea, you ask, when you’ve clearly read other blog posts telling you to check the README file for compatability instructions?
There are also compatability issues with memcache itself; various versions of the gem are specifically compatible with various versions of the software.
Anyway, start here:
Download version 0.21, compile and install.
Then read the README that comes with the memcached gem and download and install the appropriately compatible version of memcache. How to read the README if the gem isn’t installed?
Now that you’ve done both of those, you can install the memcached gem.
And after you’ve done that, if you want to be able to use it in development, you have to install the memcache-client gem. The memcached gem is intended to run on your server, the memcache-client gem is meant to run locally in development.