Windows XP
I assume you're on XP Service Pack 2, purely because it's the latest, safest version at the time of writing. We've got a couple of options on Windows, the quick and easy temporary solution, or the more permanent solution. Whichever you pick is all down to preference, if you're just trying out Rails to see how it fits, then carry on with this section, otherwise skip on to option 2 and we'll get you a more permanent option.
Instant Satisfaction
InstantRails is a bundle of the applications you needed to run a Ruby on Rails site, but without any of the hassle of installing and and configuring the software yourself. Installing is a simple matter of downloading the compressed zip file from their site and extracting it somewhere, I found the best results come from extracting it to the C drive directly and naming the directory InstantRails. InstantRails comes with a MySQL database, Apache web server, PHP Database Manager (phpMyAdmin), Ruby and Ruby on Rails. Your applications should be placed inside the rails_apps folder. Once you're ready to go you can just double-click the InstantRails.exe file which is at the root of your extracted folder. Try this out if you're only playing with Rails because it's a good start package and you can tinker to your hearts content.
Manual Installation
As with any operating system, there is a set of pre-requisites that you need before you can start developing, and it's mostly everything that comes with InstantRails with the added option of flexibility. You can install whatever database engine you want, and choose your web server etc. We'll be using MySQL 5 for the database engine and WEBrick for the web server.
Installing Ruby
For windows we can hop on over to the RubyForge project called One-Click Installer and grab the latest stable package for Ruby. All you need to do is double click this file and you'll have a working Ruby binary installed and ready to go, and as an added bonus you also get a choice of 2 free editors with it (Scite or FreeRIDE).
Installing MySQL
MySQL kindly bundles their latest stable release as a 1 click installer for Windows on their developer site. Download the latest stable Community release and double click the installer, you'll be presented with a list of options to fill in, just use the default typical install as this suits our need perfectly. You don't need to sign up for a MySQL account but if you'd like to join the MySQL community please go ahead and sign up when the installer asks you. Once you reach the option to configure your server, make sure that the option to do it now is filled in and we'll do that now.
Figure 1-1

Figure 1-1 shows we need to choose a standard configuration, this will save us from the scary details and just let us configure the most necessary options.
Figure 1-2

In Figure 1-2 we're asking MySQL to configure itself as a Windows Service (Which let's us use the Microsoft Management Console to configure the startup options and other useful commands), and we're adding the directory location of the MySQL utilities to the command line PATH variable, this means that when we open a console and type mysql (The commandline client to access your databases) that we won't be greeted with an error message.
Figure 1-3

Figure 1-3 is a choice you can change if you so desire, on my development machines I rarely enable network access and sit behind a firewall to the internet also, so the I don't need to secure my database server. If you'd like a password for the root user account (Which is the super user for the database. The Alpha, the Omega, the Ultimate, The One) then tick the top checkbox and fill in the fields, make sure you don't forget what you write down here.
Figure 1-4

Figure 1-4 just reviews what's about to happen, so go ahead and click Next. If you happen to get an error message that says testing access to the service failed, then double check your Windows Firewall settings because it is probably blocking port 3306 and will need to be given an exception.
Figure 1-5

A successful installation is illustrated on Figure 1-5, hopefully you'll be here by now and so we're ready to install Ruby on Rails with the knowledge that our MySQL engine is sat waiting for us.
Installing Ruby on Rails
To install Ruby on Rails we use Ruby Gems that got installed when we used our one click installer in the first part of this section, open up your command prompt (Click Start and then Run, type cmd and press enter) then type:
$ gem install rails --include-dependencies
This command can take some time, and sometimes looks like it's not doing anything because updating the index can take a while. It gets an up to date list of available gems, and then proceeds to install Ruby on Rails from the online repository. You should see some output like this:
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rails-1.1.4
Successfully installed activesupport-1.3.1
Successfully installed activerecord-1.14.3
Successfully installed actionpack-1.12.3
Successfully installed actionmailer-1.2.3
Successfully installed actionwebservice-1.1.4
Installing ri documentation for activesupport-1.3.1...
Installing ri documentation for activerecord-1.14.3...
Installing ri documentation for actionpack-1.12.3...
Installing ri documentation for actionmailer-1.2.3...
Installing ri documentation for actionwebservice-1.1.4...
Installing RDoc documentation for activesupport-1.3.1...
Installing RDoc documentation for activerecord-1.14.3...
Installing RDoc documentation for actionpack-1.12.3...
Installing RDoc documentation for actionmailer-1.2.3...
Installing RDoc documentation for actionwebservice-1.1.4...
Now we're all set and ready to start developing some funky Ruby on Rails applications!