librelist archives

« back to archive

Using Resque as a plugin

Using Resque as a plugin

From:
Adam Tucker
Date:
2009-11-11 @ 18:29
Hi; the instructions are very straightforward when using Resque as a gem,
but I was curious if there is a recommended way to run the front-end when
using Resque as a plugin.

Thanks for the great work!

Re: Using Resque as a plugin

From:
Chris Wanstrath
Date:
2009-11-11 @ 23:23
On Wed, Nov 11, 2009 at 10:29 AM, Adam Tucker <adam.j.tucker@gmail.com> wrote:

> Hi; the instructions are very straightforward when using Resque as a gem,
> but I was curious if there is a recommended way to run the front-end when
> using Resque as a plugin.

Your best bet is to still install Resque as a gem and setup a Rack app that way.

However, if you're running Rails 2.3+ you can load the front end as a
Rack middleware:

http://guides.rubyonrails.org/rails_on_rack.html

Check out the included config.ru as a reference:

http://github.com/defunkt/resque/blob/master/config.ru

Cheers,

-- 
Chris Wanstrath
http://github.com/defunkt