# Couldn't Find Handler For: puma, thin, falcon, webrick

*Published on December 09, 2021*

---


This morning, I was trying to learn Rack and how Rails uses it. So I created a new gem using the&nbsp;`bundle gem`&nbsp;command. Then I added a&nbsp;`config.ru`&nbsp;file with the following code.

```ruby
class App
  def call(env)
    ['200', {'Content-Type' => 'text/html'}, ['Hello World']]
  end
end

run App.new

# Alternatively, you can use this, too
# run Proc.new { |env| ['200', {'Content-Type' => 'text/html'}, ['Hello World']] }
```

To launch the server, I ran the&nbsp;`rackup`&nbsp;command. However, it immediately crashed with the following error.

```bash
➜  sandbox (main) ✗ rackup          
bundler: failed to load command: rackup (/../gems/ruby-3.0.2/bin/rackup)
/../lib/rack/handler.rb:45:in 'pick': Couldn't find handler for: puma, thin, falcon, webrick. (LoadError)
```

This error means that Rack can’t find an application (app) server to serve your web application.

To fix this error, add an app server to your application. For example, to install&nbsp;[Puma](https://github.com/puma/puma)&nbsp;(the default app server that ships with Rails), you will add this to your Gemfile.

```ruby
# Gemfile
gem 'puma'
```

Then in the terminal, run the following command.

```bash
➜  bundle install
```

That’s it. If you run the&nbsp;`rackup`&nbsp;command, it will start the server without errors.

```bash
➜  sandbox (main) ✗ rackup        
Puma starting in single mode...
* Puma version: 5.5.2 (ruby 3.0.2-p107) ("Zawgyi")
*  Min threads: 0
*  Max threads: 5
*  Environment: development
*          PID: 2378
* Listening on http://127.0.0.1:9292
* Listening on http://[::1]:9292
Use Ctrl-C to stop
```

Hope this helps.

