How to Install Ruby on Rails on Windows | ![]() |
![]() |
Written by Arash Karimzadeh |
Saturday, 16 May 2009 15:05 |
This article shows how easily you can install RoR on windows xp. Using RubyInstaller. I am using windows xp and I installed MySQL previously which I wont talk about right now. Lets start. 1.Get the RubyInstallerThe latest version at this moment is 1.8.6-26 Final (2007-12-14) . Download it and run t. it is going to extract some files by default in c:\ruby which is ok for me. This Installer is going to copy some stuff:
2.Check what you just installedAfter you run the exe file. You must have folder named ruby (mine is located in c:\ruby). check it. Check the ReleaseNotes.txt as you see there are some useful information. for example mine has: ruby-mswin32 ruby-1.8.6-p111 You can also check your ruby version by running this command in your command prompt: ruby -v and also check gem version by: gem -v 3.Installing railsNow it is time to install rails by using this command at your command prompt: gem install rails --include-dependencies It will take some seconds-minutes to start the installation. Now check your rails version by rails -v 4.Create first projectI'm going to create my first project in drive D by this command: rails firstApp It will create some files and folders. Which helps you to code and organize your file in rails format.Lets see what we just did! 5.Start the web serverYou can start it by typing this command in your project folder which is now firstApp. ruby script/server As you see mine has a little problem.Which caused by not updating my gem. Lets update the gem by: gem update --system After updating, lets try to start the server again. ruby script/server Yes! It's working fine. Now you can check your application at this address http://localhost:3000. You will see the rails welcome page. 6.Install MySQLThere is no need to start talking about MySQL. You can get the latest MySQL installer from its website and the wizard will do the rest of the things. ;) After installing mysql, you must install ruby mysql library by: gem install mysql |
Last Updated on Saturday, 16 May 2009 15:24 |