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/
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 :
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
This will open the window as shown below
Click on Environment Variable (at right down corner) as shown in image below:
Now to check it is successfully installed open command line (cmd)
(Search cmd in Start menu/Search bar)
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.
Type command ruby --version
you will get the version name if installed successfully Kudos!
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
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
Top comments (0)