Skip to content

Instantly share code, notes, and snippets.

@gkop
Last active December 14, 2015 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkop/5009369 to your computer and use it in GitHub Desktop.
Save gkop/5009369 to your computer and use it in GitHub Desktop.
Bundle from git a gem with additional require paths
source 'https://rubygems.org'
# bundle from git and the ext/ directory in the gem is not found in the require path
gem 'rbtagger', :git => "git://github.com/taf2/rb-brill-tagger.git"
# bundling from rubygems or local path works, however
# gem 'rbtagger'
# or
# gem 'rbtagger', :path => "~/play/rb-brill-tagger"
$ bundle
...
$ bundle exec irb
1.9.3-p327 :001 > require 'rbtagger'
LoadError: cannot load such file -- word_tagger/word_tagger
from /home/gabe2/.rvm/gems/ruby-1.9.3-p327@scratch/bundler/gems/rb-brill-tagger-d83a3a6f4cf3/lib/word/tagger.rb:2:in `require'
from /home/gabe2/.rvm/gems/ruby-1.9.3-p327@scratch/bundler/gems/rb-brill-tagger-d83a3a6f4cf3/lib/word/tagger.rb:2:in `<top (required)>'
from /home/gabe2/.rvm/gems/ruby-1.9.3-p327@scratch/bundler/gems/rb-brill-tagger-d83a3a6f4cf3/lib/rbtagger.rb:10:in `require'
from /home/gabe2/.rvm/gems/ruby-1.9.3-p327@scratch/bundler/gems/rb-brill-tagger-d83a3a6f4cf3/lib/rbtagger.rb:10:in `<top (required)>'
from (irb):1:in `require'
from (irb):1
from /home/gabe2/.rvm/rubies/ruby-1.9.3-p327/bin/irb:13:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment