ruby gems
abstract
RubyGems is Ruby's package manager.
basics
- Gems are installable Ruby libraries and/or applications.
- RubyGems is a program which installs gems and their dependencies.
-
gem
is the shell command which runs RubyGems. - RubyGems typically downloads gems from rubygems.org.
- RubyGems can also download gems from private repositories.
commands
These commmands use rake as an example gem.
gem env |
show environment |
gem install rake |
install the rake gem |
gem list --local |
show installed gems |
gem search ^rake$ |
find gems by regex |
gem uninstall rake |
remove the rake gem |
gem update --system |
update RubyGems itself |
gem which rake |
show path where the rake gem is installed |
dependencies
RubyGems is included with Ruby 1.9+.
examples
Install a specific version of rake :
gem install rake:13.3.2
Use a regex to find gems whose names start with rake
:
gem search ^rake
faq
- Where are the official docs?
- RubyGems guides
-
gem install
reference