<?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>The House of Ding &#187; Rails</title>
	<atom:link href="http://www.houseofding.com/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.houseofding.com</link>
	<description>Technology, programming, design, and everything in-between.</description>
	<lastBuildDate>Fri, 30 Oct 2009 03:09:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ubuntu + Rails + Passenger + OCI8 = Sad</title>
		<link>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/</link>
		<comments>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/#comments</comments>
		<pubDate>Thu, 21 May 2009 14:40:45 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[oci8]]></category>
		<category><![CDATA[passenger]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=199</guid>
		<description><![CDATA[LoadError (Oracle/OCI libraries could not be loaded: libclntsh.so.11.1: cannot open shared object file: No such file or directory -&#160;/usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so) Have you seen this error in your Rails application? Do you hate it as much as I do? I&#8217;ve spent the past two days troubleshooting this and I finally found a solution. It&#8217;s ugly and hacky, [...]]]></description>
			<content:encoded><![CDATA[<h3>LoadError (Oracle/<span class="caps">OCI</span> libraries could not be loaded: libclntsh.so.11.1: cannot open shared object file: No such file or directory -&nbsp;/usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so)</h3>
<p>Have you seen this error in your Rails application? Do you hate it as much as I do? I&#8217;ve spent the past two days troubleshooting this and I finally found a solution. It&#8217;s ugly and hacky, but it appears to be&nbsp;working.</p>
<p>There are actually quite a few posts out there regarding this error and they all get down to the root problem: the LD_LIBRARY_PATH environment variable is not available to the Apache user (www-data in this case). Most solutions I&#8217;ve found involve setting this variable in /etc/bash.bashrc or /etc/profile to make the variable available to all users. This fixed part of the problem for me, but it was still failing when executed from Apache via&nbsp;Passenger.</p>
<h3>The&nbsp;&ldquo;solution&rdquo;</h3>
<p>The hacktastic solution was to modify the /etc/init.d/apache2 startup script and explicitly set the LD_LIBRARY_PATH variable when Apache is started. Specifically,&nbsp;change </p>
<p><code>ENV="env -i LANG=C&nbsp;PATH=/usr/local/bin:/usr/bin:/bin"</code></p>
<p>to </p>
<p><code>ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin&nbsp;LD_LIBRARY_PATH=/opt/oracle/instantclient"</code></p>
<p>Note that this solution assumes you&#8217;re using the Oracle InstantClient; if you&#8217;re using the full Oracle client, you may try setting the ORACLE_HOME path instead of&nbsp;LD_LIBRARY_PATH.</p>
<p>I hope this helps&nbsp;somebody!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
