Install gem package and install rails gem.