redis-store: conflict with resque? Redis is not a module
rails 3.1 app, gemfile looks somethin like this:
gem 'redis', '2.2.1'
gem 'resque', '1.19', :require => "resque/server"
gem 'resque-scheduler', :git => 'https://github.com/bvandenbos/resque-scheduler.git'
gem 'resque-retry', '0.1.0'
gem 'resque-lock', '1.0.0'
gem 'redis-rails', '0.0.0'
It looks like redis-rails is defining Redis as a module, but redis/resque, etc has already defined it as a class. Is there a workaround for this?
starting my server:
$ rs
:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/resque-1.19.0/lib/resque/server.rb:12:in `<class:Server>'
rake aborted!
Redis is not a module
(See full trace by running task with --trace)
:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/resque-1.19.0/lib/resque/server.rb:12:in `<class:Server>'
/Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/redis-rails-0.0.0/lib/redis-rails/version.rb:1:in `<top (required)>': Redis is not a module (TypeError)
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/redis-rails-0.0.0/lib/redis-rails.rb:1:in `<top (required)>'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
from /Users/jsharpe/veloracing/config/application.rb:11:in `<top (required)>'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/railties-3.1.3/lib/rails/commands.rb:52:in `require'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/railties-3.1.3/lib/rails/commands.rb:52:in `block in <top (required)>'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
from /Users/jsharpe/.rvm/gems/ruby-1.9.2-p290@veloracing/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
from ./script/rails:6:in `require'
from ./script/rails:6:in `<main>'
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 19 (5 by maintainers)
I had this same error with rails (5.0.0.rc1). To solve it I had to install the gem from Github like so.