Today I learn how to use the first step of Cuba (Ruby microframework for web development).

To install cuba you need to do the following steps in your terminal:

$ gem install cuba

Now you have Cuba install in your terminal :)

I created a folder with the name:


In this folder you need to create a new file called:
If you don’t like to use the extension .md, you can use: .markdown and .mdown.

Create another file called app.rb with the following code:

require "cuba"

Cuba.define do
  on(root) do
    res.write("Hello World!")

Finally to run the application create a file called with the following code:

require "./app"


Then you need to run rackup which is a command to run rack applications, it will use the file.

Now you go to http://localhost:9292 and that’s it!

Hello Cuba