<?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>Allied Technique Blog</title>
	<atom:link href="http://blogs.alliedtechnique.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.alliedtechnique.com</link>
	<description>Allied Technique Blog</description>
	<lastBuildDate>Mon, 05 Oct 2009 06:37:57 +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>uninitialized constant BackgrounDRb</title>
		<link>http://blogs.alliedtechnique.com/2009/04/18/uninitialized-constant-backgroundrb/</link>
		<comments>http://blogs.alliedtechnique.com/2009/04/18/uninitialized-constant-backgroundrb/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 09:23:36 +0000</pubDate>
		<dc:creator>Andrew Muia</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.alliedtechnique.com/?p=17</guid>
		<description><![CDATA[Over the course of its lifespan, Backgroundrb has understandly transformed as new features and enhancements are implemented. However, if you are an earlier adopter, you might run into issues if you have a earlier version of backgroundrb and subsequently install newer versions of the dependencies that backgroundrb relies on. I ran into this issue when [...]]]></description>
			<content:encoded><![CDATA[<p>Over the course of its lifespan, Backgroundrb has understandly transformed as new features and enhancements are implemented.  However, if you are an earlier adopter, you might run into issues if you have a earlier version of backgroundrb and subsequently install newer versions of the dependencies that backgroundrb relies on.</p>
<p>I ran into this issue when migrating a legacy codebase onto a new CentOS 5.2 server.  After copying over the codebase to the new server, I proceed to install all the  required gems and fired up mongrel_cluster, which worked fine. However, upon attempting to start backgroundrb, the following errors were registered in the backgroundrb server log.</p>
<blockquote><p>activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing&#8217;: uninitialized constant BackgrounDRb::MasterWorker::BinParser (NameError)</p>
<p>from /current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:148:in `post_init&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_connection.rb:25:in `invoke_init&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:334:in `decorate_handler&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:78:in `accept_connection&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:220:in `handle_external_messages&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:196:in `handle_read_event&#8217;</p>
<p><span> </span>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:192:in `each&#8217;</p>
<p>from /lib/ruby/gems/1.8/gems/packet-0.1.15/lib/packet/packet_core.rb:192:in `handle_r</p></blockquote>
<p>It took me a while to figure out what the matter was, but eventually, comparing the gem versions in the old and new servers, I noticed that the original <em>packet</em> gem was 0.1.5 and the new one was 0.1.15.  And seeing that packet is where the error originated, I uninstalled 0.1.15 and replaced with it 0.1.5</p>
<blockquote><p>$&gt; gem uninstall packet</p>
<p>$&gt; gem install packet -v=0.1.5</p></blockquote>
<p>And surely enough, with the older packet gem installed, backgroundrb server started up fine. I suppose a long term solution would be to upgrade to the latest version of backgroundrb but that would require refactoring all the current workers. I choose instead to live to fight another day. </p>
<blockquote></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.alliedtechnique.com%2F2009%2F04%2F18%2Funinitialized-constant-backgroundrb%2F&amp;linkname=uninitialized%20constant%20BackgrounDRb"><img src="http://blogs.alliedtechnique.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.alliedtechnique.com/2009/04/18/uninitialized-constant-backgroundrb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing ruby-xslt gem on CentOS 5.2</title>
		<link>http://blogs.alliedtechnique.com/2009/04/17/installing-ruby-xslt-gem-on-centos-52/</link>
		<comments>http://blogs.alliedtechnique.com/2009/04/17/installing-ruby-xslt-gem-on-centos-52/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 18:41:53 +0000</pubDate>
		<dc:creator>Andrew Muia</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.alliedtechnique.com/?p=14</guid>
		<description><![CDATA[Ruby-xlst is one of those gems that has been known to throw curve balls during the installation process. This is usually because the gem has dependencies on libraries that are typically not installed on a system by default. On CentoOS 5.2 the following sequence of commands should do the trick $&#62; yum install libxml2-devel libxslt [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby-xlst is one of those gems that has been known to throw curve balls during the installation process. This is usually because the gem has dependencies on libraries that are typically not installed on a system by default.  On CentoOS 5.2 the following sequence of commands should do the trick</p>
<blockquote><p>$&gt; yum install libxml2-devel libxslt libxslt-devel</p>
<p>$&gt; gem install  ruby-xslt</p></blockquote>
<p>The first command uses <em>yum</em> to installed the required libxml2 and libxslt libraries. Once this is done, you can then install the gem.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.alliedtechnique.com%2F2009%2F04%2F17%2Finstalling-ruby-xslt-gem-on-centos-52%2F&amp;linkname=Installing%20ruby-xslt%20gem%20on%20CentOS%205.2"><img src="http://blogs.alliedtechnique.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.alliedtechnique.com/2009/04/17/installing-ruby-xslt-gem-on-centos-52/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Global Environment Variables in CentOS</title>
		<link>http://blogs.alliedtechnique.com/2009/04/16/setting-global-environment-variables-in-centos/</link>
		<comments>http://blogs.alliedtechnique.com/2009/04/16/setting-global-environment-variables-in-centos/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 01:52:17 +0000</pubDate>
		<dc:creator>Andrew Muia</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://blog.alliedtechnique.com/?p=4</guid>
		<description><![CDATA[The easiest way to set an environment variable in CentOS is to use export as in $&#62; export JAVA_HOME=/usr/java/jdk.1.5.0_12 $&#62; export PATH=$PATH:$JAVA_HOME However, variables set in such a manner are transient i.e. they will disappear the moment you exit the shell. Obviously this is not helpful when setting environment variables that need to persist even [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest way to set an environment variable in CentOS is to use <strong><em>export</em></strong> as in</p>
<blockquote><p>$&gt; export JAVA_HOME=/usr/java/jdk.1.5.0_12</p>
<p>$&gt; export PATH=$PATH:$JAVA_HOME</p></blockquote>
<p>However, variables set in such a manner are transient i.e. they will disappear the moment you exit the shell. Obviously this is not helpful when setting environment variables that need to persist even when the system reboots.</p>
<p>In such cases, you need to set the variables within the system wide profile.  In CentOS (I&#8217;m using v5.2), the folder <em>/etc/profile.d/</em> is the recommended place to add customizations to the system profile.</p>
<p>For example, when installing the Sun JDK, you might need to set the JAVA_HOME  and JRE_HOME environment variables. In this case:</p>
<ol>
<li>Create a new file called java.sh<br />
<blockquote><p>vim /etc/profile.d/java.sh</p></blockquote>
</li>
<li>Within this file, initialize the necessary environment variables<br />
<blockquote><p>export JRE_HOME=/usr/java/jdk1.5.0_12/jre<br />
export PATH=$PATH:$JRE_HOME/bin</p>
<p>export JAVA_HOME=/usr/java/jdk1.5.0_12<br />
export JAVA_PATH=$JAVA_HOME</p>
<p>export PATH=$PATH:$JAVA_HOME/bin</p></blockquote>
</li>
</ol>
<p>Now when you restart your machine, the environment variables within java.sh will be automatically initialized<em> (checkout /etc/profile if you are curious how the files in /etc/profile.d/ are loaded) </em>.</p>
<p>PS: If you want to load the environment variables within<em> java.sh</em> without having to restart the machine, you can use the <em>source</em> command as in:</p>
<blockquote><p>$&gt; source java.sh</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.alliedtechnique.com%2F2009%2F04%2F16%2Fsetting-global-environment-variables-in-centos%2F&amp;linkname=Setting%20Global%20Environment%20Variables%20in%20CentOS"><img src="http://blogs.alliedtechnique.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blogs.alliedtechnique.com/2009/04/16/setting-global-environment-variables-in-centos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

