Last Updated: January 28, 2019
·
2.225K
· brnkrygs

Resque on Windows

Recently I've been working on integrating Resque as a background task processor into our platform.

Unfortunately, my team's development platform is Windows, which doesn't always play nicely with cutting edge web or Ruby tools. Using http://rubyinstaller.org and Dave Hoover's "Do YOU know Resque?", I was able to get Resque working quite easily. BUT, Resque-web would not run. I kept ending up with a Vegas error saying

gem_original_require' no such file to load win32/process

and the first few hours of Googling gave me no results.

Being somewhat new to Ruby, it wasn't immediately obvious what the problem was. I assumed that when I installed the Resque gem, all possible dependencies would come along with it. Turns out that wasn't the case.

On Windows, Vegas^1^ has a dependency on a gem called win32-process that wasn't automatically installed. If I was more familiar with Ruby stacktraces I (hopefully) would have seen that Ruby was telling me exactly what it needed. I had to install the dependency. Manually installing win32-process got me a huge step closer to running Resque-web:

C:\>gem install win32-process

After that, I faced a missing HOME error, so I set that environment variable like this:

C:\>set HOME=C:\Users\username

Also, several blogs and issue reports suggest running Resque-web with -F on windows to restrict forking.

And finally, in order to properly set my redis namespace, I had to include it in the connection string, not as a paramter to -n.

C:\path\to\demo>resque-web -p 8282 -r server.domain.name:redis-port/Resque-namespace -F -L

After all of this, I was able to successfully fire up resque-web on Windows and move forward with developing our solution.

1. For those unfamiliar with Resque, Vegas is a wrapper around sinatra that Resque uses to serve Resque-web - the built-in web admin console for Resque.

3 Responses
Add your response

Thanks mate!
Works fine at my end.Even I could not find any issues/stackoverflow posts over this problem and was getting frustrated in running the resque console.

over 1 year ago ·

Hi Brian. Thank you for this post. I was able to run resque-web on windows machine using this instruction but my problem is that UI is visible only on localhost. How can I configure IIS to give access to resque-web from network?

over 1 year ago ·

@yubarseg it been a while since I've used this, but I'm pretty sure that since Resque wraps Sinatra for resque-web, IIS is not involved at all. Its like an OWIN self-hosted web app (if you're familiar with recent .NET developments). My guess is that in order to get this available on the network, you would need to configure windows firewall to allow HTTP/S traffic through the resque-web port, as well as have DNS entries for the resque-web host.

over 1 year ago ·