Install the latest matching (SemVer) version of a gem

gem

  • Interact with the package manager for the Ruby programming language.
    More information: <https://rubygems.org>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

gem install {{gemname}} --version '~> {{1.0}}'

click the source code to copy install gem on any operating system with command-not-found.com