Find by Category

How to Install Ruby on Rails 6 on Windows 10

Download & Install Ruby on Windows

You can now install both Ruby 2.6 and DevKit together from rubyinstaller website. But if you only need ruby to be installed on your windows system, just download any ruby 2.x version from Ruby without DevKit download section.
Download Ruby 2.6.x version without DevKit

Download & Install DevKit on Windows

If you wish to install Ruby on Rails on Windows then you’ll require DevKit, which helps C-extensions compile immediately. Previously DevKit was downloaded and installed separately on Windows systems. Now, both ruby and DevKit can be installed together with just one click from rubyinstaller website.

Download both Ruby 2.6.x and DevKit together

To install Ruby on Rails, you need to install ruby with DevKit. Once your ruby is installed, check the ruby version with following command.

ruby -version

Install NodeJS and Yarn for Ruby on Rails

install nodejs for rails

You’ll require Nodejs and Yarn to be installed before your start installing Rails 6.

Download & Install NodeJS

To install NodeJS, simply visit and download the latest or the stable version of Node and install it. With Node installation, you get nodejs, npm, and npx but yarn needs to be installed once you have nodejs installed on your system.

Install Yarn for Rails

npm i -g yarn
Watch me install Nodejs and Yarn on Windows 10

Let’s install Ruby on Rails 6

To install Ruby on Rails 6 without document. I do not prefer installing docs just because it takes time and space on the system.

gem install rails --no-document

It takes time. I know. After Rails is installed. Just create a demo app to test if Rails Development environment is set up properly.

rails new demoapp
cd demoapp
rails server

There is possibility that you’ll get errors, to fix errors scroll down. I have listed few common errors with solutions.

Rails Posts you might like

  1. Rails 6 Tutorial – Create your first app
  2. Install Rails without Documentation
  3. How to Install Ruby on Rails 5.1.4 on Ubuntu 16.04 / 17.04

Watch me install Ruby on Rails on Windows

Watch me install Ruby on Rails on Windows 10

Rails sqlite3 gem error – Windows 7/8/10

replace gem sqlite3

Replace gem sqlite3 with the following code and run bundle install

gem 'sqlite3', '~> 1.4'

replace with

gem 'sqlite3', git: "", branch: "add-gemspec"


gem ‘sqlite3’, ‘~> 1.3’

or ..

gem 'sqlite3'

One of the above must work with your setup, then

bundle install && rails server

RAILS_ENV=development environment is not defined

Simply run the following command, make sure you have already installed nodejs and yarn

rails webpacker:install

Now go ahead and run bundle install and rails server

bundle install 

rails server


No connection pool with ‘primary’ found.

Replace the following line in Gemfile

gem 'sqlite3', '~> 1.4'


gem "sqlite3"

Puma caught this error: Error loading the ‘sqlite3’ Active Record adapter

In Gemfile replace sqlite3 gem with following command and bundle install

gem 'sqlite3'


bundle install && rails server

Now run bundle install and rails server