UPDATE (new solution):
Try Yehuda Katz new bundler gem. gem install bundlerthen create Gemfilewith all your dependencies. See the documentation for more details.
Old Recommendation:
- vendor lib $LOAD_PATH.
:
$ cd vendor/gems
$ gem unpack active_support
Unpacked gem: '/path/to/myproject/vendor/gems/activesupport-2.3.2'
, ( ).
/ $LOAD_PATH, - :
Dir.glob(File.join("vendor", "gems", "*", "lib")).each do |lib|
$LOAD_PATH.unshift(File.expand_path(lib))
end
: ( ) , GEM_PATH. :
require 'rubygems'
gem_paths = [File.expand_path(File.join("vendor", "gems")), Gem.default_dir]
Gem.clear_paths
Gem.send :set_paths, gem_paths.join(":")
Rip (Rubys Intelligent Packaging) . , .