Keywords: ruby on rails, ruby gems, windows
Most of the tutorails for installing ruby on rails are available for Linux and Mac. And very few for Windows. You know I got vexed because I don’t know how to install rails and rubygems. To be frank I nearly tried around 1.5 weeks for instaaling ruby, rubygems, rails. So I have decided to write a tutorial to help you people out there. This installation process may take about a hour.
Installing Ruby
Installing ruby is easy. Just an click will do the job. You can get the one click installer from here. It is advisable that you install ruby in the following directory C:\ruby and also I recommend to install ruby 1.8.6. Having installed ruby you need to make sure wether ruby has been installed in the system.
Try this command line “ruby –v” (without quotes) and you should get something like this: ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]. That’s it ruby is installed in your system.
Installing rubygems:
When installing ruby you will have gems installed in to it. All that you have to do is to update the gems. So for updating gems use this command in the command line. You should be in the following directory before trying out this command. C:\ruby\bin. If you don’t know how to get in to this directory type this command “cd C:\ruby\bin” without quotes. Note you will see the word ruby in the command. This may vary for you. Probably it could be rubyX, where X is version. So check the exact folder name in C: or in the directory where you have installed ruby in your system.
“gem update –system” without quotes. Probably it will take some 4 to 5 minutes not more than that. Note: if you get error such as cannot connect to socket or any other error that is related to network, try disabling your windows firewall and anti virus firewall. After disaling the firewall it should work.
Installing Rails
Go to C:\rubyX\bin in your command prompt and type this command
“gem install rails” without quotes. Installing rails will test your patience. Even there will be no progress for sometime, don’t panic ! Have some coffee or tea or whatever you want to have in the mean time. Now you need a database. I’ll teach you how to do that in the next paragraph
Installing sqlite3 :
Again you can do this from the command line itself. Make sure you are inside C:\rubyX\bin, then type this command
“install the sqlite3 gem” without quotes
You may get an error when you build your apps such as “sqlite.dll not found. Re-installing the application will fix it”. So what you have to do is download the sqlite.dll file put it in your ruby\bin folder, which will fix the problem. You can get sqlite.dll from here
Time to test your rails installation: Create a folder called rails in C:. Go to command line and change the directory to C:\rails. Then type “rails project_name”. In my case project_name is “basic”, so instead of project_name, I’ll use basic. Hit enter. It will create a list of folders inside Basic. Ruby ships along with WEBrick. Now you need to start your WEBrick server. For doing that “ruby script/server” hit eneter some messages will displayed. Goto your browser type http://localhost:3000. You will have rails web page. Alas you have made it.
Feel free to ask questions. You can either ash here or contact me at praveenram05@yahoo.com with subject as installing ruby on rails.
Have a nice time

Lennie Carroll on January 24, 2010
Howdyeverybody . First Of All wonderful page . I loved reading your through your site.Thought I would tell ya, I voted your blog up at reddit . Enjoy