I'm using resque for background processing, the route /resque works fine in development, but in production (using passenger) it doesn't, the log/production.log shows the error:
ActionController::RoutingError (No route matches [GET] "/resque/overview")
when I run the command
rails routes | grep resque
it shows:
/resque
#<Resque::Server app_file="/var/www/webroot/ROOT/vendor/bundle/ruby/2.7.0/gems/resque-2.0.0/lib/resque/server.rb">
my Gemfile:
gem 'resque'
my config/initializers/resque.rb
require 'resque/server' # this is needed for resque web UI
redis_url = {
development: 'localhost:6379',
production: Redis.new(url: 'redis://{user}:{password}/{host_url}:6379/0')
}
rails_env = Rails.env.to_sym || 'development'
Resque.redis = redis_url[rails_env.to_sym]
my routes
authenticated :user, -> user { user.admin? } do
mount Resque::Server.new, :at => "/resque"
end