views:

56

answers:

1

I got this error when I start my project with memcache (gem) and rails 3.0.0beta

Here's the full trace:

/Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/cache/mem_cache_store.rb:39:in `build_mem_cache': uninitialized constant ActiveSupport::Cache::MemCacheStore::MemCache (NameError)
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/cache/mem_cache_store.rb:65:in `initialize'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/cache.rb:64:in `new'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/cache.rb:64:in `lookup_store'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/application/bootstrap.rb:47
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/kernel/reporting.rb:22:in `with_warnings'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/application/bootstrap.rb:47
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/initializable.rb:25:in `instance_exec'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/initializable.rb:25:in `run'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/initializable.rb:55:in `run_initializers'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/initializable.rb:54:in `each'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/application.rb:119:in `initialize!'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/application.rb:81:in `send'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/railties-3.0.0.beta4/lib/rails/application.rb:81:in `method_missing'
    from /Users/netbe/Projects/banana/config/environment.rb:5
    from config.ru:3:in `require'
    from config.ru:3
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
    from /Users/netbe/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
    from config.ru:1:in `new'
    from config.ru:1

Here's some code from my environment.rb, line #5 : module Cache

require 'active_support/cache'
module ActiveSupport
  module Cache
    class MemCacheStore < Store
      def logger
        Rails.logger
      end
    end
  end
end

Is there anyone who can guess what's wrong here, is it a rails 3 issue?

A: 

actually you have not added gem "memcache-client" to your Gemfile, apparently you only have gem "memcache"

Waheedi