Work right through a good tutorial such as railstutorial.org, which is
free to use online. Don't use Windows, use Linux (eg Ubuntu) or Mac.
Install ruby and rails using rvm (or possibly rbenv, I don't have
experience of that). Also read through the Rails Guides.