From: Luis Lavena Date: 2008-11-20T12:21:15+09:00 Subject: Re: RubyGems load path On Nov 19, 10:47 pm, Rodrigo Kochenburger wrote: > Hi Guys, > > How can i change the RubyGem load path, so that requiring a gem from > within my application loads it from a custom path instead of the > system-wide repository? > > I've tried setting Gem.path and overriding Gem.default_path but none > worked. > You should look into GEM_PATH and GEM_HOME environment variables. Merb is doing something similar, making their bundled gems first in the search of GEM_PATH. You can do something like this: require 'rubygems' Gem.clear_paths ENV['GEM_HOME'] = File.join(Dir.pwd, 'gems') ENV['GEM_PATH'] = File.join(Dir.pwd, 'gems') puts Gem.dir puts Gem.path Now you can do your show adding or removing gems from there ;-) HTH, -- Luis Lavena