To learn rails well you need to install the right tools. We will start with the operating system.. Ruby is native to Linux, and hence install the most popular Linux distro Ubuntu. Information about Ubuntu and how to set it up can be found in http://ubuntu.com .
Once installed you need to install a good IDE. I would recommend a light ans suitable IDE called Geany. To install Geany, launch terminal in Ubuntu and type
$ sudo apt-get install geany
And it should be installed.