From: aj Date: 2010-05-01T08:40:05+09:00 Subject: Re: installing a ruby gem with a native extension On Apr 30, 3:34 pm, Mike Dalessio wrote: > [Note:  parts of this message were removed to make it a legal post.] > > On Fri, Apr 30, 2010 at 2:45 PM, aj wrote: > > On Apr 29, 9:43 pm, Luis Lavena wrote: > > > On Apr 29, 7:56 pm, aj wrote: > > > > > I am new to ruby. I want to install a ruby gem which tries to build a > > > > native extension. The gem in this case is nokogiri. If I do gem > > > > install nokogiri, the native extension dynamically links against > > > > libxml, libxslt libs. I want to statically link against those libs. > > > > How should I go about this? > > > I am running it on a RHEL 3 machine. > > Perhaps you're trying to solve the wrong problem? > > If you install alternative (to the system-installed) libxml2 and libxslt > shared libraries, it's very easy to tell Nokogiri to use those libraries to > dynamically link -- seehttp://nokogiri.org/tutorials/installing_nokogiri.htmlfor details (and a > RHEL example). > > IMHO that's easier than trying to hack the extconf.rb to link statically. Thanks for the reply Mike. I do want to link them statically. So I do $ gem fetch nokogiri How to extract the gem file? gem unpack works only on installed gem.