Locked lesson.
About this lesson
Adding, removing, and installing Gems.
Exercise files
Download this lesson’s related exercise files.
Understanding the Gemfile and Gems.docx58.7 KB Understanding the Gemfile and Gems - Solution.docx
58.9 KB
Quick reference
Understanding the Gemfile and Gems
To add third party functionality to our Rails app, "Gems" are added to the "Gemfile".
When to use
Any time you want to add any sort of third party functionality to your app, you'll use a gem from RubyGems.org. Simply add it to your Gemfile and run the "bundle install" command in the terminal.
Instructions
Adding things to your app is very easy with Rails. There's an entire community of Gems available for free at RubyGems.org.
To add a Gem, paste the Gem reference into your Gemfile, then run the "bundle install" command from the terminal.
Hints & tips
- Gems can be found at RubyGems.org
- Gems are added to the Gemfile
- To Install Gems, run the "bundle install" command from the terminal after adding the gem reference to the Gemfile
- Sometimes Gems come with additional installation instructions - so always read the documentation!
Lesson notes are only available for subscribers.