Saturday, February 14, 2015

Steps to install Rails on Windows

Instigation : Currently I am having a training on ROR (Ruby on Rails) for a project which is more concerned on the productivity than the performance. Since Rails is based on Ruby, which is a scripting language, it's productivity is very high. Although, too much memory consumption directly effects for it's performance.

Note:  

  • If you have successfully installed Ruby, you can skip steps 1 and 2.
  • If you have successfully configured Ruby development kit, you can skip steps 3 and 4.


Step 1: Download the required ruby version from the following location.

http://rubyinstaller.org/downloads/

Step 2: Run the executable file and select 3 options while running.

















By selecting those options, it will help you to configure ruby on your environment.

Step 3: Download and run the development kit which is relevant to the ruby installation, from the following link.

http://rubyinstaller.org/downloads/

This will ask you to extract files and it is better to give the same root location where ruby is installed.

Step 4: Open a command prompt and go to the development kit extracted location. Run the following commands.
  1. ruby dk.rb init
  2. ruby dk.rb install
Step 5: Open a command prompt and run following command to install Rails. You can run it from any location. It will find the Ruby installed location and will install Rails into the Ruby. Through this it will install gems which are related to run Rails on Ruby.

gem install rails

Step 6: On the command prompt go to a location where you like to create your Rails project and type:
rails new <ProjectName>

This will create the project with its folder structure.

Step 7: Cd <ProjectName>, run"bundle install". There you might get SSL certificate issue. Open the "Gemfile" file in the project folder and edit the source value's protocol as "http", and run the command again.

Step 8: Cd  <ProjectName>/bin, and run "rails server".

Step 9: Go to the page http://localhost:3000 from your browser. If you are getting following, you have successfully installed the Rails and your server is running successfully.




No comments:

Post a Comment