public
Created

Configuring Resque Web Interface in Application

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#The steps need to be performed to use resque-web with in your application
 
#In routes.rb
 
ApplicationName::Application.routes.draw do
resources :some_controller_name
mount Resque::Server, :at=> "/resque"
end
 
#That's it now you can access it from within your application i.e
#http://localhost:3000/resque
 
#To be insured that that Resque::Server is loaded add its requirement condition in Gemfile
 
gem 'resque', :require=>"resque/server"
 
#To add basic http authentication add resque_auth.rb file in initializers folder and add these lines for the security
 
Resque::Server.use(Rack::Auth::Basic) do |user, password|
password == "secret"
end
 
#That's It !!!!! :)
 
#Thanks to Ryan from RailsCasts for this valuable information.
#http://railscasts.com/episodes/271-resque?autoplay=true

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.