From: aj Date: 2010-05-01T08:20:06+09:00 Subject: Re: installing a ruby gem with a native extension On Apr 30, 2:56 pm, Luis Lavena wrote: > On Apr 30, 3:42 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? > > > > Please provide information about your ruby installation and rubygems > > > version (usually "gem env" command is enough) > > > > Also, if using Linux, which distribution is helpful too to determine > > > which commands would you require to execute. > > > > Help us help you > > > -- > > > Luis Lavena > > > Thanks for the reply Luis. > > The output of gem env > > RubyGems Environment: > >   - RUBYGEMS VERSION: 1.3.1 > >   - RUBY VERSION: 1.9.1 (2009-12-07 patchlevel 376) [i686-linux] > >   - INSTALLATION DIRECTORY: /opt/lin32/ruby-1.9.1-p376/lib/ruby/gems/ > > 1.9.1 > >   - RUBY EXECUTABLE: /opt/lin32/ruby-1.9.1-p376/bin/ruby > >   - EXECUTABLE DIRECTORY: /opt/lin32/ruby-1.9.1-p376/bin > >   - RUBYGEMS PLATFORMS: > >     - ruby > >     - x86-linux > >   - GEM PATHS: > >      - /opt/lin2/ruby-1.9.1-p376/lib/ruby/gems/1.9.1 > >      - /home/john/.gem/ruby/1.9.1 > >   - GEM CONFIGURATION: > >      - :update_sources => true > >      - :verbose => true > >      - :benchmark => false > >      - :backtrace => false > >      - :bulk_threshold => 1000 > >   - REMOTE SOURCES: > >      -http://gems.rubyforge.org/ > > > I am running it on a RHEL 3 machine. > > Please look in RHEL documentation how to install GCC and build tools > required to compilation. > > Also, you will need the development headers/packages of your Ruby and > the libraries that the gem you install will require. > > If you tell us more about "what" gem are you trying to install and the > specific error message when doing "gem install --debug -V" > provides you, the better. > > -- > Luis Lavena Hi Luis, I said that in my original post - "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? "