Error in installing RPM: requires Ruby Version > = 2. ** [How to Solve]

 

3 error conditions

Upgrade Ruby

Download GPG public key

gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
or
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
or
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import (My Choice)

Download RVM and set up environment

curl -L http://get.rvm.io | bash -s stable
source /usr/local/rvm/scripts/rvm

View existing Ruby versions

rvm list known

Upgrade to 2.4.0

rvm install 2.4.0

Install RPM again

gem install fpm

Read More: