DEV Community

Harsh
Harsh

Posted on

1 1

Environment Setup: Ruby on Rails: Platform : Windows

Environment setup of Ruby on Rails is a headache for newbie developers so let's how we can easily establish a link between the software and new developer. Just sit back and relax and follow :P ! Without wasting more time let's just get started

STEP 1:

Install Ruby installer from https://rubyinstaller.org/downloads/

Image description

Since I have x64 Windows machine hence I will be downloading that.

You can check yours using Windows
Settings > System > Scroll Down ( About) Your will see your System type as shown below :

Image description

What the Devkit version ?

  • RubyInstaller uses the MSYS2 toolchain as its development kit. It is bundled into the Ruby+Devkit installer version as a selectable component, so that no additional downloads/installs are required. It’s possible to share one Devkit among multiple versions of Ruby. MSYS2 is required in order to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails
source: https://rubyinstaller.org/

STEP 2:

Open Installer install it as the normal application no need to interfere the default configuration just next next LOL!

STEP 3:

Setting up Environmental variable:

Search Environmental Variable in Start menu / Search Bar of Windows

Image description

This will open the window as shown below

Image description

Click on Environment Variable (at right down corner) as shown in image below:

Image description

Now to check it is successfully installed open command line (cmd)

(Search cmd in Start menu/Search bar)

Image description

Check this line it should contain the path of your ruby version mine is ( C:\Ruby30-x64\bin) if it is not there in your add it.

Image description

Type command ruby --version you will get the version name if installed successfully Kudos!

Image description

To setup binaries follow the steps here https://www.msys2.org/

download msys2 and as per instruction given in msys2 website do it. Now that you have done that all the binaries are installed we are very close to our missing Here after step 7 do type the following command in same terminal)

pacman -S mingw-w64-x86_64-yarn
pacman -S mingw-w64-x86_64-nodejs

Image description
Nodejs and yarn are required for Webpacker and msys2 since both

Now we need to Install Rails :

Open cmd type below command

gem install rails

to check if successfully installed type rails --version

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay