Skip to content

Instantly share code, notes, and snippets.

@J-Gull
Created July 2, 2011 13:20
Show Gist options
  • Save J-Gull/1060167 to your computer and use it in GitHub Desktop.
Save J-Gull/1060167 to your computer and use it in GitHub Desktop.
Configuring Resque Web Interface in Application
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment