# Mongrel\_rails can't find memcache-client

**URL:** <https://www.ruby-forum.com/t/mongrel-rails-cant-find-memcache-client/185658>\
**Category:** Mongrel\
**Created:** [March 24, 2010, 7:56am UTC](https://www.ruby-forum.com/t/mongrel-rails-cant-find-memcache-client/185658 "2010-03-24T07:56:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6bbea6/32.png) [@t\_s](https://www.ruby-forum.com/u/t_s)\
**Post date:** [March 24, 2010, 7:56am UTC](https://www.ruby-forum.com/t/mongrel-rails-cant-find-memcache-client/185658/1 "2010-03-24T07:56:01Z")

</div>

I added memcache-client to our app:  
config.gem “memcache-client”, :version =\> “1.8.1”

According to “gem list” the gem is there:  
memcache-client (1.8.1)

If I run our app with “script/server” everything works just fine but  
when I try to run it with “mongrel\_rails start” it stops with error:  
no such file to load – memcache-client

So is there something different how mongrel\_rails looks up gems? What is  
so special about this gem as the other gems work just fine?

---

<div class="post-metadata">

**Author:** ![t\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6bbea6/32.png) [@t\_s](https://www.ruby-forum.com/u/t_s)\
**Post date:** [March 24, 2010, 11:02am UTC](https://www.ruby-forum.com/t/mongrel-rails-cant-find-memcache-client/185658/2 "2010-03-24T11:02:02Z")

</div>

On Wed, Mar 24, 2010 at 7:56 AM, T\_ S\_ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So is there something different how mongrel\_rails looks up gems? What is  
> so special about this gem as the other gems work just fine?

When you start mongrel\_rails, you’re doing without daemonize, correct?

There is no configuration file that indicates mongrel should change  
user or group when running, correct?

It might be that the memcache-client gem is not installed system wide.

I’ve used mongrel\_rails, combined with memcache-client and memcached  
in a bundler configuration and worked without issues, so the problem  
might be something else.

Can you build an exact pastie/gist of the output you’re receiving? (or  
can replicate with a simple rails app?)

## Thank you

## Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![t\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6bbea6/32.png) [@t\_s](https://www.ruby-forum.com/u/t_s)\
**Post date:** [April 23, 2010, 7:47am UTC](https://www.ruby-forum.com/t/mongrel-rails-cant-find-memcache-client/185658/3 "2010-04-23T07:47:35Z")

</div>

I switched from gem “memcache-client” to gem “memcache” and it works  
without any problems. Both gems are installed in the same way etc.

Unfortunately rails when set to use memcache as a session store  
references to the “memcache-client” so that needs to be included also  
and I’m back with the original error message.

Funny things is of course that it’s not really using that  
“memcache-client” gem as in an initializer i say

CACHE = Memcache.new(:server =\> “localhost:11211”, :namespace =\> ‘web’,  
:segment\_large\_values =\> true)

And in session\_store.rb

ActionController::Base.session = {  
:key =\> ‘\_xxxxx’,  
:secret =\> ‘xxxxxxx’,  
:cache =\> CACHE,  
:expires =\> 15.minutes  
}

So the end result is that when I start mongrel with “mongrel\_rails  
start” it complains that “no such file to load – memcache-client” but  
the server keeps running and app works as that gem is not really used.

> When you start mongrel\_rails, you’re doing without daemonize, correct?

Yep.

> There is no configuration file that indicates mongrel should change  
> user or group when running, correct?

Yep.

> It might be that the memcache-client gem is not installed system wide.

In my local env I’m using rvm to handle different ruby envs. So the gems  
are installed to specific ruby env under my home dir, not system wide.  
But i did try this with system wide installation also and it didn’t  
help.

> Can you build an exact pastie/gist of the output you’re receiving? (or  
> can replicate with a simple rails app?)

Here’s the output:  
[http://pastie.org/931033](http://pastie.org/931033)
