Assuming it is a linux or Mac OS then I recommend installing using rvm (others prefer rbenv).
However I suggest that you start by working right through a good tutorial such as http://www.railstutorial.org (which is free to use online). This tutorial runs in the cloud and does not need you to install anything to get going. Once you have learnt the basics then installing on your own machine will be easier as you will know what to expect.
As a matter of interest why have you installed an almost obsolete version of Rails whereas 4.2.4 is the current version.