tldr: I was unable to spin up the example app under Ruby 3, but able to run it under 2.7.2. I'm not certain of the root cause.
In all failure cases, the error was this:
/home/ken/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1755:in detect_rack_handler': Server handler (thin,puma,reel,HTTP,webrick) not found. (RuntimeE rror) from /home/ken/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1493:inrun!'
from /home/ken/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/sinatra-contrib-2.1.0/lib/sinatra/reloader.rb:260:in run!' from example/oauth2.rb:82:in'
I read that WEBrick was removed from 3.0, but adding the gem to the Gemfile failed with the same error, as did Shotgun and Puma. As stated, downgrading to 2.7.2 allowed me to start and successfully complete the oauth flow without needing to provide or specify an app server.
I'd like to use this api in a Rails 6 app running Ruby 3. I'm willing to help but am not very familiar with Sinatra or how Rack decides which handler to use, and trying to provide an app server pretty much exhausted my initial ideas. If you know what's wrong and it's an easy fix, thanks. :) If not, I'd appreciate any guidance you could provide.
tldr: I was unable to spin up the example app under Ruby 3, but able to run it under 2.7.2. I'm not certain of the root cause.
In all failure cases, the error was this:
I read that WEBrick was removed from 3.0, but adding the gem to the Gemfile failed with the same error, as did Shotgun and Puma. As stated, downgrading to 2.7.2 allowed me to start and successfully complete the oauth flow without needing to provide or specify an app server.
I'd like to use this api in a Rails 6 app running Ruby 3. I'm willing to help but am not very familiar with Sinatra or how Rack decides which handler to use, and trying to provide an app server pretty much exhausted my initial ideas. If you know what's wrong and it's an easy fix, thanks. :) If not, I'd appreciate any guidance you could provide.