Skip to content

Instantly share code, notes, and snippets.

@brycelambert
Created November 26, 2013 05:21
Show Gist options
  • Save brycelambert/7653830 to your computer and use it in GitHub Desktop.
Save brycelambert/7653830 to your computer and use it in GitHub Desktop.

##Running a Gem from Source

In your Gemfile, specify the gem and the path to its source.

gem 'gem_name', path: '/~/code/gem_folder'

Require the gem in your program.

require 'gem_name'

Run the program with

bundle exec ruby main.rb

This command runs the program with the gem source path(s) specified in the Gemfile, rather than the default Ruby load paths. By default, RVM installs and looks for gems in ~/.rvm/gems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment