Hi, today we are going to create a Ruby on Rails project on a Windows computer.

  1. Download the Rails installer from here.
    Download the 2.1 version available at the time of writing this post. It will install lot of things in one go 🙂
  2. Now start a new command prompt and create a folder named rails_projects ( not necessary, just wanted to put our projects in one place )
  3. Go into the newly created folder and execute the command
    rails new first_project

    This will create all the files and folders required for a rails project.
    If you see error similar to this:

    Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate

    then, please follow the steps from this link:
    SSL upgrades on rubygems.org and RubyInstaller versions

  4. Rails by default provide the WEBrick web server for our applications. To start the server, go inside your project folder and execute the command:
  5. rails server
    rails s
  6. This will start the rails server for your project.
  7. Now start your browser and navigate to the url
  8. Bingo, you just saw your first page ready, although it is a default page from Rails.

Click here to understand Rails project directory structure