diff options
-rw-r--r-- | Gemfile | 3 | ||||
-rw-r--r-- | activesupport/activesupport.gemspec | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 7 |
3 files changed, 9 insertions, 3 deletions
@@ -21,6 +21,9 @@ elsif RUBY_ENGINE == "jruby" gem "jruby-openssl" end +# AS +gem "memcache-client", ">= 1.7.5" + # AR if mri || RUBY_ENGINE == "rbx" gem "sqlite3-ruby", "= 1.3.0.beta.2", :require => 'sqlite3' diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index f2ee35ce75..8611a1e5fa 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -18,6 +18,4 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.has_rdoc = true - - s.add_dependency('memcache-client', '>= 1.7.5') end diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index d8377a208f..e3a2688e2f 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -1,4 +1,9 @@ -require 'memcache' +begin + require 'memcache' +rescue LoadError => e + $stderr.puts "You don't have memcache installed in your application. Please add it to your Gemfile and run bundle install" + raise e +end require 'digest/md5' module ActiveSupport |