Skip to content

Instantly share code, notes, and snippets.

@abargnesi
Created July 18, 2014 15:15
Show Gist options
  • Save abargnesi/4b8eb1ba941ef97c82b7 to your computer and use it in GitHub Desktop.
Save abargnesi/4b8eb1ba941ef97c82b7 to your computer and use it in GitHub Desktop.
Using local directories for gem dependency paths.
.
├── directories
├── Gemfile
├── Gemfile.dev
├── Gemfile.dev.lock
├── Gemfile.lock
├── libraries
│   └── gemx
│   ├── gemx.gemspec
│   └── lib
│   └── gemx.rb
└── test.rb
3 directories, 8 files
gem 'gemx', :path => './libraries/gemx'
PATH
remote: ./libraries/gemx
specs:
gemx (0.0.1)
GEM
specs:
PLATFORMS
ruby
DEPENDENCIES
gemx!
Gem::Specification.new do |spec|
spec.name = 'gemx'
spec.version = '0.0.1'
spec.license = 'MIT'
spec.summary = %q{Gem X}
spec.description = %q{Gem X description}
spec.authors = ['Gem X']
spec.email = '[email protected]'
spec.homepage = 'http://nowhere.org'
spec.files = Dir.glob('lib/**/*.rb')
spec.require_paths = ["lib"]
end
# vim: ts=2 sw=2:
# encoding: utf-8
module Gemx
def self.test
puts "foo"
end
end
require 'rubygems'
require 'bundler'
Bundler.require
puts Gemx.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment