From: Eric Hodel Date: 2008-07-01T09:16:28+09:00 Subject: Re: using gems without installing them (like jar files) On Jun 30, 2008, at 15:37 PM, Suraj Kurapati wrote: > Eric Hodel wrote: >> Instead you can do: >> >> gem install -i ~/tmp/gems foo >> GEM_HOME=~/tmp/gems ruby my_foo_using_program.rb >> rm -r ~/tmp/gems > > Awesome! Did not know about GEM_HOME. > >>> If gem files in the load path can be treated as a virtual file >>> system >>> (VFS) then this should be possible, no? >> >> Somebody would need to write that code, but it would only work for >> gems without extensions to be compiled, and would not generate useful >> documentation. > > Those limitations are acceptable for me, as I'm trying to use pure- > Ruby > gems anyway. I'll try to write the VFS code during this holiday > weekend > and submit a patch next week. Were I writing it, I would make a Kernel#require overlay that knows how to look inside a .gem file for the things it needs. No need to extend File.