Creating a new rails 6 app

Ankit Wadhwana
TechVerito
Published in
2 min readAug 21, 2019
Photo by Julian Hochgesang on Unsplash

Who will benefit from this post:

people who have rails 5.2 or lower installed and looking to create a new rails 6 app from scratch.

Make sure your Ruby version is compatible

The first change that comes with Rails 6 is the minimum Ruby version it requires. While Rails 5 required at least Ruby 2.2.2, Rails 6 will make you upgrade to Ruby 2.5.0 or higher.

Updating Ruby version

If you are using rbenv, you can easily do so by running the following commands:

rbenv install 2.6.0
rbenv global 2.6.0
ruby -v

else if you are using rvm, you can easily do so by running the following commands:

rvm install 2.6.0
rvm use 2.6.0 --default
ruby -v

else checkout GoRails setup on how to install rbenv/rvm

Installing rails 6

Once the ruby version is updated, we just have to install the latest rails gem.

gem install rails

If you’re using rbenv, you’ll need to run the following command to make the rails executable available:

rbenv rehash

Now that you’ve installed Rails, you can run the rails -v command to make sure you have everything installed correctly:

rails -v
# Rails 6.0.0

Creating a new rails 6 app

rails new MyBlog 

this will create a new rails app with rails version 6 and ruby version 2.6

THAT’S ALL (:

--

--