If you are searching for a step by step guide to setup Rails 4.0 on a Windows 7 machine (x86/x64), please follow the steps below one by one : -
Please fetch your Ruby 2.0 (x86 version only) windows installer from here.
Install the downloaded Ruby 2.0 installer, while selecting the following 2 options: -
- Add Ruby install path to your environment variables
- Associate with ’.rb’ files
Please open a command prompt and then type : -
- ruby -v, check it displays the installed ruby version correctly.
- gem -v, check it displays the installed gem version.
- gem update –system –no-ri –no-rdoc
Please fetch your Ruby 2.0 devkit (again x86 version only) from here.
Unzip your downloaded devkit zip and cd into the extracted directory and then type : -
- dk.rb init
- dk.rb install
Please fetch your SQLite 3 dll from here and copy the contents of the downloaded zip in the ‘bin directory’ under your Ruby installation directory.
Please open a command prompt and type the following commands : -
- gem install rails –no-ri –no-rdoc
- gem install sqlite3 –no-ri –no-rdoc
If all of the above commands completes successfully, you are finished with your rails installation. Please start your sample project by typing : -
- rails new <projectName>
- cd into ’projectName’ directory
- type ’rails server’
- browse to localhost:3000.
Enjoy!!!
Alternatively while installing the various gems using the command prompt you can skip the ’–no-ri –no-rdoc’ appendage if you want to install the ruby doc that comes with your gems.