Before you can begin coding you need a development environment where you can create and publish your work. A Ruby on Rails development environment requires a number of different programs that you may have never heard of. If this is your first time coding, this step can may be challenging. It isn’t always challenging, sometimes it will go really smoothly. I’m going to do my best here to help you so it goes smoothly.
Your environment is dependent upon your operating system (and the version of your OS). There are a bunch of tutorials out there walking you through setting up your development environment. I will point out some of the best ones that I know of.
Here's an excellent guide for mac users: Install Rails.
You really only need a single script to install Rails on Linux. Here are some good instructions from Rails Girls.
I have bad news for you. In comparison to Mac and Linux, it is much more difficult to get Rails installed on Windows machines. The installation bugs are unpredictable and time consuming and sometimes never resolved. When you’re first starting out this is not what you want to be dealing with. Trust me. I was a TA for an Intro to Rails class where I fielded thousands of students questions as they started learning Rails. I saw first hand on a large scale the problems with Windows and a Rails Development Environment.
So, what do you do? You could test it out and see if you run into trouble. Or you could use something like Nitrous.io. It’s pretty awesome. It’s a browser-based developer environment. There’s even a free account. Once you create an account you can code and even collaborate on code all in an internet browser. Especially as you start out I recommend getting started with Nitrous.