First you will want to make sure that you’ve enabled the universe repository.

Open up a terminal window, and type in the following commands:

To test out the installation, you can create a test rails project:

This will create a test application. Change directory into that directory and launch the Ruby on Rails development server (WEBrick)

Example:

You’ll notice that the server is listening on port 3000. Open up a browser, and go to http://localhost:3000