Mount a Sinatra app on your Ruby on rails (3) application

logoI have been migrating a Rails 2.3.10 application to Rails 3.0.9, while doing so I also migrated our queue system from delayed_jobs that ripped our system apart to Resque.

Resque comes with a Sintra app to monitor the Queue, see what’s going on and what jobs failed etc.

It’s very convenient and you can really grasp what’s going on with your system. I really missed that in delayed_job (amongst other things).

So, I wanted to mount this Sinatra app onto our rails application.

It turns out to be VERY easy and straight forward.

Just add this to your routes.rb file:


mount Resque::Server, :at => “/resque”


In an initializer, just require the “resque/server” and you are done!

Submit to Hacker News

[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.

[NOTE] updated August 22, 2011. It's 2716 days old . This article may have outdated content.