Created
July 2, 2011 13:20
-
-
Save J-Gull/1060167 to your computer and use it in GitHub Desktop.
Configuring Resque Web Interface in Application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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