From: Joshua Haberman Date: 2005-10-03T05:08:38+09:00 Subject: Re: why can't Ruby load .gem files directly? --Apple-Mail-4--347340683 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Oct 1, 2005, at 10:25 PM, Jim Weirich wrote: > On Sunday 02 October 2005 12:27 am, Joshua Haberman wrote: > >> I'm not sure what you mean by that. Could you elaborate (or point me >> to documentation that provides more detail about this problem)? >> > > If you have a shared library embedded in your gem file, how do you > point your > LD_LIBRARY_PATH environment variable at it so that the OS knows > about it. > Not only is a hard problem to solve, it is a hard problem that must > (potentially) be solved differently on each platform. Yes, I can definitely see that loading a shared library packaged inside a gem is not going to work. So why not have shared libraries live in their own files in the gem directory? my-gem-dir/ my-gem-dir/foo-1.2.gem my-gem-dir/foo-1.2-libfoo.so my-gem-dir/foo-1.2-libbar.so my-gem-dir/baz-0.3.gem The gem could specify what shared libraries need to be loaded (or you could pattern match on file names -- eg. load "foo-1.2*.so") Yes, that would mean that packages containing C extensions would no longer be one single gem file, but luckily we have tar to help with that. Josh --Apple-Mail-4--347340683--