What is the simplest way to run locally a Ruby CGI app

I am looking for a very simple e.g. 5 lines of code if possible way without using external servers such as NginX and Apache etc

**EDIT:**

To be more precise:

Given a simple Ruby script I would like to serve it as CGI, either by requiring a Gem within it or by using another tiny .rb script.

By serve as CGI I mean to be able to interact with it using my web browser