How to Install Ruby on Rails on Windows and Linux?
Last Updated :
08 Aug, 2024
Ruby on Rails or just known as rails, is free and open-source software written in
Ruby language under the MIT license. It is a server-side web application development framework, designed to make programming web applications easier by making assumptions about what every developer needs to get started. Rails is a model–view–controller (MVC) framework that allows one to write less code while accomplishing more than many other frameworks. Rails itself provides the structure for a database, web pages, and a web service. Being object-oriented and a high-level programming language, it is gaining much popularity.
Downloading and Installation
Before you install Ruby on Rails, make sure SQLite3 and Ruby are installed on your computer. To know whether you have SQLite3 and Ruby installed in your system, type the following command in your command line:
$ ruby –version
$ sqlite3 --version
If they are not installed, first we need to install them.
Now that you have SQLite3 and Ruby installed in your system, it's time to install Rails, for installation and setting up of Rails, follow the steps given below:
Step 1:
Type the following command in the ruby terminal:
$ gem install rails
This will install rails in both Windows and Linux operating systems.
Step 2:
To verify that rails have been installed, type the following command and it should report its version.
$ rails --version
Step 3:
To make your first web application in rails type the following command in the command line:
$ rails new project
where project is the name of your application. It will show something like this:

Step 4:
It will create a Rails application called project. Then, cd into that project using the following command:
$ cd project
Step 5:
To start up your web server, type the following command:
$ bin/rails server
or just
$ rails server
Step 6:
Now navigate to the localhost 3000 and you will be able to see the following output:
Similar Reads
How to Install Rust on Windows and Linux Operating System? Rust is a blazing fast and memory-efficient static compiled language with a rich type system and ownership model. It can be used to power performance-critical services while guaranteeing memory-safety and thread-safety, empowering developers to debug at compile-time. In addition to that Rust has gre
2 min read
How to Install Java on Windows, Linux and macOS? Java is a versatile programming language widely used for building applications. To start coding in Java, you first need to install the Java Development Kit (JDK) on your system. This article provides detailed steps for installing Java on Windows 7, 8, 10, 11, Linux Ubuntu, and macOS.Download and Ins
5 min read
How to install Ruby on Windows? Prerequisite: Ruby Programming Language Before we start with the installation of Ruby on Windows, we must have first-hand knowledge of what Ruby is?. Ruby is a pure Object-Oriented language developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid-1990s in Japan. Everythi
2 min read
How to Install Ruby Bundler on Windows? Ruby is a high-level and open-source programming language. It is very useful in many aspects. Like other programming languages, Ruby is nowadays a highly useful programming language. Bundler is a type of environment manager in Ruby. It is generally used to install and update correct Gems for Ruby. G
2 min read
How to Install Git on Windows Subsystem for Linux? Git is an open-source distributed version control system developed to handle everything from simple to complex projects with performance and speed. Git software allows a team or group of developers to work together, with all using the same files and folders. It gradually reduces the confusion that t
2 min read