<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Olle Jonsson&#039;s blog &#187; libxml2</title>
	<atom:link href="http://ollehost.dk/blog/tag/libxml2/feed/" rel="self" type="application/rss+xml" />
	<link>http://ollehost.dk/blog</link>
	<description></description>
	<lastBuildDate>Tue, 22 May 2012 20:28:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Installing libxml-ruby for libxml2 with Ruby, on OS X</title>
		<link>http://ollehost.dk/blog/2006/11/07/installing-libxml-ruby-for-libxml2-with-ruby-on-os-x/</link>
		<comments>http://ollehost.dk/blog/2006/11/07/installing-libxml-ruby-for-libxml2-with-ruby-on-os-x/#comments</comments>
		<pubDate>Mon, 06 Nov 2006 23:50:25 +0000</pubDate>
		<dc:creator>Olle Jonsson</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[libxml2]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://olle.ter.dk/blog/?p=322</guid>
		<description><![CDATA[Update 2012: This material was written in 2006. Now, many years later, it still poisons the search engines with its presence. If you want to use Ruby and a package manager on OS X, you should use RVM and Homebrew. &#8230; <a href="http://ollehost.dk/blog/2006/11/07/installing-libxml-ruby-for-libxml2-with-ruby-on-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Update 2012</strong>: This material was written in 2006. Now, many years later, it still poisons the search engines with its presence. If you want to use Ruby and a package manager on OS X, you should use <a href="https://rvm.beginrescueend.com/" title="Ruby Version Manager">RVM</a> and <a href="http://mxcl.github.com/homebrew/" title="Homebrew package manager">Homebrew</a>. I will leave this page here as a warning to you, dear reader. Do not take detailed old technical Ruby recipes as advice.</p>
<p>Just had an exciting package management adventure with Ruby and XML on OS X.  I wanted <a href="http://libxml.rubyforge.org/doc/">Libxml2 wrapped in a Ruby gem</a>. So, I ran </p>
<pre><code>sudo gem install libxml-ruby</code></pre>
<p>&#8230;and watched the software fail to build. Darn OS X not &#8220;just being Linux&#8221;. After complaining to Christoffer, I was kindly pointed to <a href="http://rb-libxml2.darwinports.com/">a MacPort</a>: </p>
<pre><code>sudo port install rb-libxml2</code></pre>
<p>OK, that worked. But I don&#8217;t want to use DarwinPorts/MacPorts for my Rubygems, the gems change far too often for that. What I wound up doing was reinstall my gem (<code>sudo gem install libxml-ruby</code>), and then copy the <code>libxml.bundle</code> to its folder:</p>
<pre><code>
# cp /usr/local/lib/ruby/gems/1.8/gems/xml/libxml.bundle \
/usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8/ext/xml/
</code></pre>
<p>Also, go into the file
<pre>/usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8/ext/xml/libxml.rb</pre>
<p> and change the required file&#8217;s name from xml/libxml_so to  xml/libxml.bundle.</p>
<p>This was enough to make the thing work!</p>
<p>Moral: The <em>right way</em> to fix this would be to enhance the Makefile of the libxml-ruby gem to teach it about the OS X environment, but: not me, not today. This little tip is what I can do today. Ciao.</p>
]]></content:encoded>
			<wfw:commentRss>http://ollehost.dk/blog/2006/11/07/installing-libxml-ruby-for-libxml2-with-ruby-on-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

