Rails uninitialized constant Resque::Server
One of the most significant changes in my migration of a rails app from Rails 2.3.10 to rails 3.0.9 was the move from delayed_jobs to resque.
Resque is a Queue system that’s based on Redis, which is much faster and reduces the load on your database. Also we were experiencing some nasty deadlocks with delayed jobs that really broke our transactions and our backs.
I installed the gem and installed Redis on my development machine, mounted the Sinatra app on my rails app and navigated to the web view of resque.
Then, I saw this error:
[ruby]
RuntimeError at /resque/overview
ERR unknown command ‘server’
file: client.rb location: call line: 47
[/ruby]
Which looked like that:
After doing some digging into the code (as I always do when I encountered a problem with a gem), I found that the version of the gem (resque) I was using called the “server” method on the redis instance which was not there any more.
Looking at the code for the new gem showed that the app is now using the property “redis_id” which looks like this:
[ruby]