Forum: Mongrel Mongrel_rails can't find memcache-client

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a43595e8e568570c15ea61fef4a8ef7?d=identicon&s=25 T_ S_ (t_s)
on 2010-03-24 07:56
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?
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2010-03-24 11:02
(Received via mailing list)
On Wed, Mar 24, 2010 at 7:56 AM, T_ S_ <lists@ruby-forum.com> 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 Lavena
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
8a43595e8e568570c15ea61fef4a8ef7?d=identicon&s=25 T_ S_ (t_s)
on 2010-04-23 07:47
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
This topic is locked and can not be replied to.