tldr/pages/common/gem.md

37 lines
703 B
Markdown
Raw Permalink Normal View History

2015-10-22 08:31:52 +01:00
# gem
2014-03-01 08:41:02 +00:00
> Interact with the package manager for the Ruby programming language.
2019-06-07 11:58:22 +01:00
> More information: <https://rubygems.org>.
2014-03-01 08:41:02 +00:00
- Search for remote gem(s) and show all available versions:
`gem search {{regular_expression}} --all`
- Install the latest version of a gem:
2014-03-01 08:41:02 +00:00
`gem install {{gemname}}`
- Install specific version of a gem:
2014-03-01 08:41:02 +00:00
`gem install {{gemname}} --version {{1.0.0}}`
2014-03-01 08:41:02 +00:00
- Install the latest matching (SemVer) version of a gem:
`gem install {{gemname}} --version '~> {{1.0}}'`
- Update a gem:
2014-03-01 08:41:02 +00:00
`gem update {{gemname}}`
- List all local gems:
2014-03-01 08:41:02 +00:00
`gem list`
- Uninstall a gem:
2014-03-01 08:41:02 +00:00
`gem uninstall {{gemname}}`
- Uninstall specific version of a gem:
`gem uninstall {{gemname}} --version {{1.0.0}}`