Question

I installed redis and resque in Rails 2.3.8 by gem install redis and gem install resque. The version of resque and redis are 1.18.0 and 2.2.2 respectively. I started the worker by

RAILS_ENV=development resque-web config/initializers/resque.rb

I also did the configurations in the config/redis.yml file as:

defaults: &defaults
  host: localhost
  port: 6379
  ...

and config/initializers/resque.rb as:

config = YAML::load(File.open("#{Rails.root}/config/redis.yml"))[Rails.env]
Resque.redis = Redis.new(:host => config['host'], :port => config['port'])

But when I want to start the resque-web by

RAILS_ENV=development resque-web config/initializers/resque.rb

I get this error

./config/initializers/../../vendors/rails/railties/lib/initializer.rb:27:in 'require_frameworks' : can't activate rack (~> 1.1.0, runtime) for [], already activated rack-1.4.1 for ["vegas-0.1.11", "resque-1.18.0"]

I found out that resque 1.18.0 requires sinatra 1.3.3 as it dependency which again requires rack >= 1.3.0 as its dependency. However, for actionpack for rails 2.3.8, the version for rack wanted is 1.1.0. Can anyone please suggest me how to solve this issue?

Était-ce utile?

La solution

You'll have to use a version of resque which requires a lower version of sinatra which then requires a version of rack that is compatible with rails 2.3.8.

You can figure this out manually, or try one of these options:

  1. Use the RubyGems dependency API (http://guides.rubygems.org/rubygems-org-api/)
  2. Retrofit bundler in your Rails 2.3.8 application
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top