How To Install Rails

To install Rails you should have Ruby installed in your machine. Ruby is by default installed in Mac and to install Ruby on windows follow below steps:

  1. download it from rubyinstaller (32bit version is better)
  2. create a new directory in C drive or any other drive of your choice (you can install it without making a new folder also but this is a better way) name it anything you want (example: Projects)
  3. install ruby in that directory
  4. make sure to check “add to path”

you can work with Ruby now, but to work with Rails you should also install Rubyinstaller Development Kit (DevKit) which you can find at the bottom of the page where you downloaded ruby from, to install devkit follow below steps:

  1. create a new folder inside the directory you created (example: Projects) and name it anything you want (example: devkit)
  2. extract devkit inside it
  3. open command prompt (cmd) and go to devkit directory
  4. type ruby dk.rb init
  5. type ruby dk.rb install
  6. type gem install json –platform=ruby
  7. type ruby -rubygems -e “require ‘json’; puts JSON.load(‘[42]’).inspect”

exit cmd and reopen it go to the directory you created (Projects) and type: gem install rails

now you have Rails installed and to create a new project open cmd and go to Projects directory and type: rails new project_name, project_name can be name you want your project to name. To make sure your project creation was successful open cmd and go to the project you created type: rails server (or simply rails s) and open a browser go to localhost:3000

2 Responses to “How To Install Rails

  • Aseef Yousufi
    5 years ago

    I want to join could share with the exact date of starting and timing ?

  • #Aseef Yousufi already started the introduction section. Will post new lessons every Saturday and you can ask questions here in comment section. I will answer questions during the week

Leave a Reply

Your email address will not be published.

Wordpress Social Share Plugin powered by Ultimatelysocial