Skip to content

Commit 5714438

Browse files
spastorinojosevalim
authored andcommitted
Unforce memcache from AS
Signed-off-by: José Valim <[email protected]>
1 parent 31e1445 commit 5714438

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ elsif RUBY_ENGINE == "jruby"
2121
gem "jruby-openssl"
2222
end
2323

24+
# AS
25+
gem "memcache-client", ">= 1.7.5"
26+
2427
# AR
2528
if mri || RUBY_ENGINE == "rbx"
2629
gem "sqlite3-ruby", "= 1.3.0.beta.2", :require => 'sqlite3'

activesupport/activesupport.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@ Gem::Specification.new do |s|
1818
s.require_path = 'lib'
1919

2020
s.has_rdoc = true
21-
22-
s.add_dependency('memcache-client', '>= 1.7.5')
2321
end

activesupport/lib/active_support/cache/mem_cache_store.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
require 'memcache'
1+
begin
2+
require 'memcache'
3+
rescue LoadError => e
4+
$stderr.puts "You don't have memcache installed in your application. Please add it to your Gemfile and run bundle install"
5+
raise e
6+
end
27
require 'digest/md5'
38

49
module ActiveSupport

0 commit comments

Comments
 (0)