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
···
On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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?
--
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.
···
On Apr 29, 9:43 pm, Luis Lavena <luislav...@gmail.com> wrote:
On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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
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 <gemname> --debug -V"
provides you, the better.
···
On Apr 30, 3:42 pm, aj <mailtome200420032...@gmail.com> wrote:
On Apr 29, 9:43 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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 LavenaThanks 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.
--
Luis Lavena
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 -- see
http://nokogiri.org/tutorials/installing_nokogiri.html for details (and a
RHEL example).
IMHO that's easier than trying to hack the extconf.rb to link statically.
···
On Fri, Apr 30, 2010 at 2:45 PM, aj <mailtome200420032002@gmail.com> wrote:
On Apr 29, 9:43 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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.
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? "
···
On Apr 30, 2:56 pm, Luis Lavena <luislav...@gmail.com> wrote:
On Apr 30, 3:42 pm, aj <mailtome200420032...@gmail.com> wrote:
> On Apr 29, 9:43 pm, Luis Lavena <luislav...@gmail.com> wrote:
> > On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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 <gemname> --debug -V"
provides you, the better.--
Luis Lavena
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.
···
On Apr 30, 3:34 pm, Mike Dalessio <mike.dales...@gmail.com> wrote:
[Note: parts of this message were removed to make it a legal post.]
On Fri, Apr 30, 2010 at 2:45 PM, aj <mailtome200420032...@gmail.com> wrote:
> On Apr 29, 9:43 pm, Luis Lavena <luislav...@gmail.com> wrote:
> > On Apr 29, 7:56 pm, aj <mailtome200420032...@gmail.com> 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.
Gems are tar archives containing gzipped tar archives and some
(gzipped) metadata. So, you can use tar to extract the gem.
Why do you want to link statically? It's going to end up being a fair
bit of effort.
···
On 4/30/10, aj <mailtome200420032002@gmail.com> wrote:
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.