Posted about 3 years ago. Visible to the public.

Gems, bundler, rbenv

Goals

  • Understand what a Gem is
  • Learn how to install a gem
  • Be able to look into gem code
    • locally
    • on GitHub
  • Learn about Bundler
    • Why is it necessary:
      • Managing versions and dependencies
      • Defining a consistent project environment
    • What is the difference between bundle install and bundle update?
    • What does bundle exec do, why is it necessary?
    • What does the file Gemfile.lock do?
  • rbenv
    • Understand why we need rbenv

Resources

Exercises

Bundler

Play around with bundler. Create a gemfile, add some gems.

Try to add an older version of a gem. Try to update it.

andand

  • Find the andand gem on rubygems.org.
  • Find its code on github.
  • Understand what it does.
  • Look at the code, and see how it works
  • Write a simple ruby script that makes use of it. How does andand's code find its way into your script?
  • Look at andand's .gemspec file and understand what it says.
  • How does the gem get to rubygems.org? Where does rubygems get all the additional info?
  • andand has "forks". What are forks and why are people creating them? How can you find them?

Owner of this card:

Avatar
Henning Koch
Last edit:
over 1 year ago
by Tobias Kraze
Posted by Henning Koch to makandra Curriculum
This website uses cookies to improve usability and analyze traffic.
Accept or learn more