How to install ruby on rails on windows?

Installing ruby and rails is not as easy on windows as it is on Mac or at Ubuntu, but things are changing now. You can install and create rails applications on a fly with existing tools for windows.In this post we will see how to install ROR in a step by step procedure :


Step 1. Download and Install ruby from RubyForge

Step 2. Now open command prompt with ruby using Start->Programs->Ruby folder -> Start Command Prompt with Ruby
Step 3. Now update gems using gem update --system


Step 4. Then in the same prompt type command: gem install rails . It would take some time depending upon your connection speed so be patient.

Step 5. Now type : rails new yourappname , that would create your application.

Step6. Start your server using rails server 


Step7. Open your browser and type http://127.0.0.1:3000

Step8. To stop the server use Ctrl + Break

Update: Some users are facing problem "native gem requires installed build tools" while bundle install , to solve it follow these steps :

1 Download DevKit file from http://rubyinstaller.org/downloads
2 Extract DevKit to path C:\Ruby193\DevKit
3. Change Directory(cd Ruby193)
4. Run batch file devkitvars.bat
Now run bundle install again.

I hope that helps!

Enjoy

No comments:

Post a Comment