alisnic / stackprof-webnav

Web UI for viewing stackprof dumps
MIT License
155 stars 17 forks source link

Fails to run because of changes in Rack #36

Open akimd opened 4 months ago

akimd commented 4 months ago
$ bundle exec stackprof-webnav
vendor/ruby/3.3.0/gems/stackprof-webnav-1.0.4/bin/stackprof-webnav:25:in `<top (required)>': uninitialized constant Rack::Handler (NameError)

Rack::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]
    ^^^^^^^^^
        from vendor/ruby/3.3.0/bin/stackprof-webnav:25:in `load'
        from vendor/ruby/3.3.0/bin/stackprof-webnav:25:in `<main>'

I have not tried to be smart, but a Q&D fix is

-Rack::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]
+Rackup::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]

in bin/stackprof-webnav.

I have

Cheers!

a-chacon commented 3 months ago

I have the same issue here:

/home/andres/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/stackprof-webnav-1.0.4/bin/stackprof-webnav:25:in `<top (required)>': uninitialized constant Rack::Handler (NameError)

Rack::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]
    ^^^^^^^^^
        from /home/andres/.rbenv/versions/3.3.1/bin/stackprof-webnav:25:in `load'
        from /home/andres/.rbenv/versions/3.3.1/bin/stackprof-webnav:25:in `<main>'
rack (3.1.7)
rack-cors (2.0.2)
rack-protection (4.0.0)
rack-session (2.0.0)
rack-test (2.1.0)
rackup (2.1.0)