add and install gem rails

C++
$ bundle add GEM_NAME --version "~> num.version"
Source

Also in C++: