In order to install Ruby on Rails(4.2.6) in your machine, you have to have Ruby installed. You can follow How to install Ruby on linux tutorial to install Ruby. After you’ve successfully installed Ruby,
gem install rails -v 4.2.6
To install latest version, don’t define the version numbers
gem install rails
You might also like...
Fixing mysql2 install error
Let's solve foobar
Challenge for the 2017
Serving Content through Cloudflare network
One liner server command in ruby
Free website using jekyll and free github hosting
How to install Jekyll ?
How to register for GithubEducation Pack ?
How to install Ruby on Linux
Ubuntu system program problem detected[Solved]