<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="layout.xsl" type="text/xsl" ?>

<content>

  <h2> Installation </h2>

  <p>Libxml-Ruby supports installation via both the standard Ruby extconf install and
  "Rubygems":http://rubygems.rubyforge.org/ . In either case the requirements are
  the same - only the installation process differs.</p>

  <h3> Prerequisites </h3>

  <p>libxml requires a few other libraries to be installed in order to build and
  function properly.</p>

  <pre>
	  * libm      (math routines: very standard)
	  * libz      (zlib)
	  * libiconv
	  * libxml2
	</pre>

  <p>We recommend GCC 4 be used for the build.</p>

  <h3> Installing with gems </h3>

  <p>Installation via Gems is very simple - just issue the appropriate command,
  e.g:</p>

	  <pre>
      gem install -r libxml-ruby
    </pre>
	
  <p>Note that depending on your setup you may need to run this as root:</p>

	  <pre>
  	  su -c 'gem install -r libxml-ruby'
	  </pre>
	
  <p>During installation Gems should build and install the extension to the correct
  location. If there are errors at this stage, Gem will report them and offer you
  the option to delete the extension.</p>

  <h3> Installing from the tarball </h3>

  <p>Installation from the source tarball is only slightly more complex. Untar the
  archive somewhere appropriate, and change to the new directory this creates.
  If your environment requires no special configuration, you can simply type:</p>

	  <pre>
      $ rake install
	  </pre>

  <p>to build, test, and install the extension.</p>

  <p>If you do need to pass options to extconf (to support a non-standard libxml2
  install location, for example) you will need to use make manually instead:</p>

	  <pre>
      $ cd ext/xml
      $ ruby extconf.rb [your-options]
      $ make
      $ [su -c ']make install[']
	  </pre>
  
  <p>Once the makefile is generated, the rest of the Rake tasks will function as
  intended, so you could run 'rake test' prior to installing, for example.</p>

  <h3> Installation problems </h3>

  <p>If you experience problems during your build, please report them to the 
  "mailing list":http://rubyforge.org/mail/?group_id=494 after searching the 
  "archive":http://rubyforge.org/pipermail/libxml-devel/ .</p>

</content>

