install gem rails ruby command line code example Example: add and install gem rails $ bundle add GEM_NAME --version "~> num.version"