Gem
a Ruby gem is a package that contains information and files. Cucumber, and RSpec are the gems I currently have.
When I need to install a new gem, I go into my Gemfile in any text editor (Sublime, Vim, etc ;) ) and add the gem and version I want to be used. For example, the latest version of Cucumber is 1.3.16, but I've specified that I want to use 1.2.1. Then I run bundle install
to ensure those versions are installed, which also updates my Gemfile.lock
gem list
- I can run this command to see a list of local gems, and the versions available
After adding a new gem to my Gemfile, run the following commands:
bundle install
- Install the dependencies specified in your Gemfile