BM
Boris Moore
September 22, 2022
Updated September 22, 2022

Installing Ruby on Rails 3.1.2 on Windows

VPS Windows

A short note about the framework:

Ruby on Rails was written in the programming language "Ruby". It was created as far back as 2004, and gained its popularity through an interaction with Apple in 2006. At that time "Apple" announced that it will ship "Ruby on Rails" together with Mac OS X 10.5 "Leopard" operating system.

Also we must not forget that this framework has influenced the development of web applications through innovative features such as creation of database tables, migration and creation of presentation frameworks to ensure fast application development.

The uniqueness of Ruby

There are many web development frameworks in the programming world, but Django and Ruby on Rails stand out the most.

This makes them the most popular web development frameworks and this popularity will continue to grow.

Framework scalability

While Django inherited its scalability from Python, it is still slightly behind Rails. It has better scalability, which is a result of its qualities of freedom and code flexibility. Both are heavyweight web development frameworks, so they are both designed with scalability in mind, but in this case the win goes to Ruby on Rails.

Syntax

Ruby's syntax is known to be very flexible. However, this can not always be attributed to the advantages of Ruby on Rails. It can cause problems and make it difficult to pass a project to other team members, as the same function can be implemented in different ways, creating confusion.

Whereas Python advocates that there should only be one obvious way to do something, which makes the code easier to debug and read.

Installing the necessary packages:

To run Ruby on Rails on Windows 10, you need to install the following programs:

  • Nodejs
  • Yarn
  • Sqlite

Let's move on to downloading and installing Nodejs.

Follow the link and download the LTS version.

wruby1

After selecting the LTS version you will automatically start downloading the package, you need to install it by opening the executable file after downloading.

Required to select the automatic installation of the necessary tools.

wruby4.2

After installation, restart your personal computer and go to the command line to check the installation.

Since we chose to install the necessary components, immediately after completion a script will open for installation.

wruby5

You can check the installation by using the command :

node --version

wruby12

Installing Yarn:

Follow the link, open the "Alternatives" tab and download the "classic stable 1.22.19" package.

wruby-8

Run the executable file and follow the installation steps.

wruby9

After installation restart your PC and check the installation by running the command line and typing the command below:

yarn --version

Installing Sqlite:

Go to the link and download the two sqlite archives:

  • sqlite-dll-win64-x64-3390300.zip
  • sqlite-tools-win32-x86-3390300.zip

wruby11

After downloading, unzip both archives to "C:\windows\system32"

You can check the functionality and version of sqlite using the command below:

sqlite3 --version

Installing Ruby:

Go to the link and download the latest version of Ruby with developer tools, currently "Ruby 3.1.2-1"

wruby13

Install Ruby by opening the executable file. Also after installation is complete check the "run rdk install" option to install MSYS2 automatically.

wruby14

The command line will automatically open with the offer to install MYSYS2, choose point 3.

wruby15

Further installation is done automatically.

You can check Ruby version and availability using command below:

ruby --version

It's required to run the commands below, first opening a command line as admin:

gem install tzinfo-data
gem install sqlite3

wruby18

gem install rails

wruby19

Create a project and run Ruby on Rails:

Open a command prompt as an administrator. Navigate to the directory you want and type the command below:

rails new *project name*

wruby20

After that, browse to your project directory and run your project with the command

rails server:

rails server

wruby23

You can go to our server using your local address.

wruby21

Note:

If you have a problem starting your project go to your project folder and open the Gem configuration file with any text editor you like. Fix the line as shown below:

Example error:

wruby26

The line before the changes:

gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]

String after changes:

wruby25

"gem tzinfo-data"

Use the commands below to check that all the packages you have installed are working:

wruby24

Ruby --version
Sqlite3 --version
Node --version
Yarn --version
Gem --version
Rails --version

Conclusion:

Thanks to this publication you can easily install Ruby on Rails on Windows 10.

Vote:
5 out of 5
Аverage rating : 5.0
Rated by: 2
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.