jamesc
jamesc

Reputation: 12837

rails resque-web gem versions out of sync with bundled gem versions, How to tell resque-web to use correct gem versions?

How do I tell resque-web to use the correct gem versions of rack, sinatra and vegas? I'm trying to solve undefined method `process_route error when I access resque-web

If I run bundle I get

Using rack (1.4.1) 
Using sinatra (1.3.3) 
Using vegas (0.1.11) 
Using resque (1.23.0) 
Using rufus-scheduler (2.0.17) 
Using resque-scheduler (2.0.0) from https://github.com/bvandenbos/resque-scheduler.git (at master) 

which are the correct versions of the gems that resque-web should be using, however when I run resque-web -v I get

rack 1.1
sinatra 1.0
vegas 0.1.8

which is causing me a massive headache with (assumption that this is the cause)

undefined method `process_route' for #<Resque::Server:0xbc22f94>

when I try to access resque web in my browser

If I run

bundle exec resque-web -v

I get

rack 1.1
sinatra 1.3.3
vegas 0.1.11

Which is still the wrong version of rack.

I'm mounting resque server with the following route

mount Resque::Server, :at => "/resque", :constraints => AdminRestriction

I'm running an nginx, unicorn setup in a rails 3.2.9 app with ruby 1.9.3 and rvm to manage project specific gemsets

This is a production server only problem, everything is fine on my dev PC

Upvotes: 0

Views: 387

Answers (1)

Winfield
Winfield

Reputation: 19145

It looks like you have the resque-web gem installed in the system, but not in your bundle. This is causing it to load an incompatible version, even though you ran bundle exec.

You should be able to resolve this by adding resque-web to your Gemfile:

gem "resque-web"

The bundle exec command will look into the bundle for the binary/script first, and execute the bundled version. However, if the gem isn't in the bundle it'll fall back on a binary/bundle on the system.

Upvotes: 1

Related Questions