Ruby on Rails 6 Tutorial: Build your First Rails 6 App

In this tutorial, you'll learn to build your first Ruby on Rails 6 application from scratch. Rails 6 is the latest version of the RoR framework which brings new improvements and features.

Big companies like Basecamp, Shopify and GitHub have already started using Rails 6 in production.

In Rails 6, we have two major frameworks newly added, Action Mailbox and Action Text.

Action Text allows you to quickly add rich text content and editing to your Rails app.

Prerequisites

You need a few prerequisites for this tutorial such as:

  • Familiarity with Ruby. Rails is a Ruby framework so you need to be comfortable with this programming language.
  • RVM (Ruby Version Manager) installed on your system. This will be used to install Ruby so if you alreay have a recent version of Ruby installed you don't need RVM. Rails 6 requires at least Ruby 1.5

Now, you are good to go!

Installing Ruby 2.6.2

We'll be using the latest stable release of Ruby - v2.6.2

You can install Ruby 2.6.2 using RVM. So go ahead and open a new terminal and run the following command:

$ rvm install 2.6.2

Installing Rails 6.0.0.rc1

Next, let's install Rails 6.0.0.rc1. Head back to your terminal and run the following command:

$ gem install rails -v 6.0.0.rc1

Creating a Rails 6 Application

Next, you can create a Rails 6 application using the following command:

$ rails new rails-first-app

Next, navigate inside your newly created application's folder and start your development server:

$ cd rails-first-app
$ rails s

You can then access your web application from your web browser at the http://localhost:3000 address.

Note: We also publish our tutorials on Medium and DEV.to. If you prefer reading in these platforms, you can follow us there to get our newest articles.

You can reach the author via Twitter:

About the author

Ahmed Bouchefra
is a web developer with 5+ years of experience and technical author with an engineering degree on software development. You can hire him with a click on the link above or contact him via his LinkedIn account. He authored technical content for the industry-leading websites such as SitePoint, Smashing, DigitalOcean, RealPython, freeCodeCamp, JScrambler, Pusher, and Auth0. He also co-authored various books about modern web development that you can find from Amazon or Leanpub


Get our Learn Angular 8 in 15 Easy Steps ebook in pdf, epub and mobi formats, plus a new Angular 8 tutorial every 3 days.


Online Courses (Affiliate)

If you prefer learning with videos. Check out one of the best Angular courses online
Angular 8 - The Complete Guide (2019+ Edition)

Angular Crash Course for Busy Developers

comments powered by Disqus
DMCA.com Protection Status