views:

279

answers:

2

I've installed just about every library/gem that I could find for memcached/memcache, but everytime I attempt to run my application I get this error:

Error message:
uninitialized constant Rails::Initializer::MemCache

Exception class:
NameError

I have tried $ telnet localhost 11211 and memcached is definitely running. Any ideas?

(I'm running Apache2/Passenger)

A: 

Try to load it at the irb prompt.

# irb
> require 'rubygems'
> gem 'memcache-client'

This should give you a more descriptive error message.

MattMcKnight
The output was:=> true
tomeara
Do you have require 'memcache-client' in environment.rb?
MattMcKnight
Thanks for your help, BTW. I do... the line looks like this:config.gem "memcache-client", :lib => "memcache"
tomeara
sorry, above that line i also have: require 'memcache'
tomeara
+1  A: 

I ended up having to put

require 'MemCache'

in my environment.rb

tomeara