Failed to load command rackup
If you’re writing a web app in Ruby 3.0 or later and you’re using Rack, you might find the following error when running bundle exec rackup
:
Couldn't find handler for: puma, thin, falcon, webrick
The reason for this is as of Ruby 3.0 webrick is no longer included in the standard library.
To overcome the problem, you need to install one of Rack’s supported webservers. You can add a gem to your Gemfile for your current project:
gem 'puma'
and run ‘bundle install’ to install the Puma webserver.
Substitute whichever webserver you prefer from Rack’s supported webservers.
Alternatively, you can run gem install puma
from your cammand line.
Now when you run bundle exec rackup
your app should run.