seomoz / qless

Queue / Pipeline Management
MIT License
295 stars 76 forks source link

Qless-Web fails to run on newer Ruby because of Vegas #298

Open stephenreay opened 2 months ago

stephenreay commented 2 months ago

As reported in https://github.com/resque/resque/issues/1746, the web UI for Qless fails to load on newer Ruby installs, due to Vegas relying on a now-removed questionable "feature".

The issue is referenced in the Vegas repo as well: https://github.com/quirkey/vegas/issues/29

A workaround is to patch the installed file, as shown in the first issue thread above:

(you may need to adjust the file path for your specific version)

/usr/local/rvm/gems/ruby-3.0.2@global/gems/vegas-0.1.11/lib/vegas/runner.rb:146: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open

    def port_open?(check_url = nil)
      begin
        check_url ||= url
-        options[:no_proxy] ? open(check_url, :proxy => nil) : open(check_url)
+        options[:no_proxy] ? URI.open(check_url, :proxy => nil) : URI.open(check_url)
        false
      rescue Errno::ECONNREFUSED, Errno::EPERM, Errno::ETIMEDOUT
        true
      end
    end

Seams to be the fix. So needs to be fixed in vegas not in resque.