Rails - Memcached::ServerIsMarkedDead

As Rails programmer, once upon a time I find that error. That error tells me that the memcached is not running. I have checked my gem list and I find memcached gem there. So, how to solve it?

To solve it, we just have to run memcached server by typing the following command on our terminal / command prompt.

sudo /etc/init.d/memcached start

After that, you have to insert your administrator password as usual when you run a command with sudo.

If you get this error when you run that command : No such file or directory, then you probably have not installed the required library on your OS. If you use Ubuntu, then you can install that required library by running this command.

sudo apt-get install memcached libmemcache-dev