How to Install a Specific Version of a Ruby Gem?

You can use the -v flag

  $ gem install GEM_NAME -v VERSION_NAME

You can also use the longer --version flag

  $ gem install GEM_NAME --version VERSION_NAME

See all the gem CLI options with gem --help

  RubyGems is a sophisticated package manager for Ruby.  This is a
  basic help message containing pointers to more information.

    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help gem_dependencies    gem dependencies file guide
    gem help platforms           gem platforms guide
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 with info about installed gems