Ruby on Rails 5 installation on Ubuntu 16.04

Guide to install Rails 5 on Ubuntu 16.04 (64bits).



Ubuntu:   16.04 (64bits) LTS (xenial)
Ruby:       2.3.0
Rails:       5.0.0


Prepare system

Update package manager:

Install curl:

Install Node.js


Ruby installation (RVM)

Install required dependencies:

RVM and Ruby:

Try to check Ruby version:

If you get error, close your current session, re-open new and try again:

Set default ruby:
(Note that your ruby version can be different, so in following command change 2.3.0 on proper version)


Bundler installation

To speed up gem installation, you can disable installing documentation: (It’s optional)

Install Bundler:


Rails installation

Install current stale version of Rails:

If you prefer install specific version of Rails, you can use following command:

After all, check Rails version:


MySQL installation

In your projects, you can use MySQL databases. To install MySQL:

During the installation, you will see the window, where you will have to set a password for root user. It’s important to keep this password!


Tomasz Antas

Ruby on Rails developer and Web designer.
The area of his interest includes Popular Science, Internet of Things, Wearables, AI and Virtual/Augmented Reality.

Latest posts by Tomasz Antas (see all)

Thanks for reading!