Permalink
Browse files

Unforce memcache from AS

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 31e1445 commit 57144388f0b4c31e43ced7cfd1d6efaded88cf5e @spastorino spastorino committed with josevalim Jun 1, 2010
Showing with 9 additions and 3 deletions.
  1. +3 −0 Gemfile
  2. +0 −2 activesupport/activesupport.gemspec
  3. +6 −1 activesupport/lib/active_support/cache/mem_cache_store.rb
View
@@ -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'
@@ -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
@@ -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

0 comments on commit 5714438

Please sign in to comment.