<?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>I'm a Richardson, RU? &#187; Programming &amp; Development</title>
	<atom:link href="http://www.imarichardson.com/cat/programming-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.imarichardson.com</link>
	<description>(ugh...really cool tagline goes here)</description>
	<lastBuildDate>Sat, 21 Aug 2010 16:36:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wirble Woes: &#8220;Couldn&#8217;t load Wirble: no such file to load&#8221;</title>
		<link>http://www.imarichardson.com/2010/08/21/wirble-woes-couldnt-load-wirble-no-such-file-to-load/</link>
		<comments>http://www.imarichardson.com/2010/08/21/wirble-woes-couldnt-load-wirble-no-such-file-to-load/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:36:48 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[Wirble]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=347</guid>
		<description><![CDATA[Recently, I decided to use Wirble to customize my console experience. I kept running into the following error after installing the gem:
1234$ script/console
Loading development environment (Rails 2.3.5)
Couldn't load Wirble: no such file to load -- wirble
&#62;&#62;
The README wasn&#8217;t able to help much, as it only mentioned adding the Ruby path to the start of the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I decided to use Wirble to customize my console experience. I kept running into the following error after installing the gem:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ script/console<br />
Loading development environment (Rails 2.3.5)<br />
Couldn't load Wirble: no such file to load -- wirble<br />
&gt;&gt;</div></td></tr></tbody></table></div>
<p>The <a href="http://pablotron.org/software/wirble/README">README</a> wasn&#8217;t able to help much, as it only mentioned adding the Ruby path to the start of the ~/.irbrc file.  The solution was to add a require &#8216;rubygems&#8217; to the ~/.irbrc. Although the error didn&#8217;t mention it the problem was that wirble couldn&#8217;t load because rubygems were instantiated.<br />
Here&#8217;s my current ~/.irbrc with the update:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$LOAD_PATH &lt;&lt; File.expand_path('~/.ruby')<br />
begin<br />
&nbsp; # load wirble<br />
&nbsp; require 'rubygems'<br />
&nbsp; require 'wirble'<br />
<br />
&nbsp; # start wirble (with color)<br />
&nbsp; Wirble.init<br />
&nbsp; Wirble.colorize<br />
rescue LoadError =&gt; err<br />
&nbsp; warn &quot;Couldn't load Wirble: #{err}&quot;<br />
end</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2010/08/21/wirble-woes-couldnt-load-wirble-no-such-file-to-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paperclip and the busted &#8220;not recognized by identify&#8221; error, and a couple other gotchas</title>
		<link>http://www.imarichardson.com/2009/09/17/paperclip-and-the-busted-not-recognized-by-identify-error-and-a-couple-other-gotchas/</link>
		<comments>http://www.imarichardson.com/2009/09/17/paperclip-and-the-busted-not-recognized-by-identify-error-and-a-couple-other-gotchas/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 20:49:17 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=337</guid>
		<description><![CDATA[If you&#8217;re using the Paperclip Gem, hopefully you won&#8217;t have the hours of stumpage I incurred. Here&#8217;s something for the Google information vat to swallow.
1. &#8220;Not recognized by identify&#8221;:  This one is resulting from a call to ImageMagick (you did know ImageMagic was required, right?) and a bad relationship with Passenger. The easiest way [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using the <a href="http://www.thoughtbot.com/projects/paperclip" target="_blank">Paperclip Gem</a>, hopefully you won&#8217;t have the hours of stumpage I incurred. Here&#8217;s something for the Google information vat to swallow.</p>
<p><strong>1. &#8220;Not recognized by identify&#8221;: </strong> This one is resulting from a call to ImageMagick (you did know ImageMagic was required, right?) and a bad relationship with Passenger. The easiest way to resolve this is to place the following line in your appropriate environment files (ie. config/environments/development.rb) making sure that it point to your local instance of Imagemagic. For my development environment on OSX it was:</p>
<pre style="background-color: #f9f9f9; border-left-width: 1px; border-left-style: solid; border-left-color: #ff9d02; border-right-width: 1px; border-right-style: solid; border-right-color: #ff9d02; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 10px; line-height: 1.6em; overflow-x: auto; overflow-y: auto; width: 513px;">Paperclip.options[:command_path] = "/opt/local/bin"</pre>
<p><em>(I&#8217;m using imagemagic from a MacPorts install; if you are on a linux distro you may need to reference /usr/local/bin.)</em></p>
<p><strong>1.5 &#8220;Not recognized by identify&#8221; is also caused when you specify &#8220;styles&#8221; for a has_attached_file type other than a photo.</strong> I&#8217;m really not sure how to get around this one, but if you are going to use any file types other than images using the following string in your model will cause the error:</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; background-color: #f9f9f9; border-left-width: 1px; border-left-style: solid; border-left-color: #ff9d02; border-right-width: 1px; border-right-style: solid; border-right-color: #ff9d02; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 10px; line-height: 1.6em; overflow-x: auto; overflow-y: auto; width: 513px;">:styles =&gt; { :large =&gt; "300x300", :medium =&gt; "200x200", :thumb =&gt; "128x128&gt;", :micro =&gt; "40x40#"}</pre>
<p><strong>2. Don&#8217;t name your model &#8220;attachment&#8221;:</strong> I googled around forever trying to figure this one out. In the end it seems to be a namespace error between Paperclip and the app &#8211; Paperclip won. I named the mode &#8220;client_attachment&#8221;.</p>
<p><strong>3. Remember to include your attachment type in you attr_accessible declaration: </strong>If you are protecting against mass assignment you&#8217;ve an attr_accessible line in your model. Be sure to include the name of the field you&#8217;re using for the attachment in the declaration. For example, if you&#8217;re using a &#8220;photo&#8221; for the Paperclip attachment, be sure to add &#8220;:photo&#8221; to your attr_accessible declaration:</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; background-color: #f9f9f9; border-left-width: 1px; border-left-style: solid; border-left-color: #ff9d02; border-right-width: 1px; border-right-style: solid; border-right-color: #ff9d02; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 10px; line-height: 1.6em; overflow-x: auto; overflow-y: auto; width: 513px;">attr_accessible :first_name, :last_name, ..., :photo</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2009/09/17/paperclip-and-the-busted-not-recognized-by-identify-error-and-a-couple-other-gotchas/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Using Declarative Association with HABTM Relationships</title>
		<link>http://www.imarichardson.com/2009/08/03/using-declarative-association-with-habtm-relationships/</link>
		<comments>http://www.imarichardson.com/2009/08/03/using-declarative-association-with-habtm-relationships/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 17:10:01 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[declarative authentication]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=325</guid>
		<description><![CDATA[For anyone out there trying to use the Declarative Authentication with a standard "Has and Belongs To Many" relationship here's a quick help.]]></description>
			<content:encoded><![CDATA[<p>In my search for an authorization/access control list solution for my Ruby needs I came across Steffen Bartsch&#8217;s &#8220;<a href="http://steffenbartsch.com/blog/2008/09/delclarative-authorization/">Declarative Authorization</a>&#8221; plugin (<a href="http://github.com/stffn/declarative_authorization/tree/master">Github source here</a>).</p>
<p>Short aside &#8230; the plugin allows for a very DRY approach to managing permission from one configuration file, not to mention that it generates a visualization of your ACL, too. This is a huge benefit when building an app that has a number of different security roles. Additionally, it allows access control on the controller, model, query, and view levels. From the site:</p>
<blockquote><p>Plugin features</p>
<ul>
<li>Authorization at controller action level</li>
<li>Authorization helpers for Views</li>
<li>Authorization at model level
<ul>
<li>Authorize CRUD (Create, Read, Update, Delete) activities</li>
<li>Query rewriting to automatically only fetch authorized records</li>
</ul>
</li>
</ul>
</blockquote>
<p>I was ecstatic about using the plugin but hit a stump when trying to work it out with my own HABTM association in my Rails app. The third requirements mentions, &#8220;User objects need to respond to a method :role_symbols that returns an array of role symbols&#8221;. My log error kept displaying:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">The use of user.roles is deprecated. &nbsp;Please add a method role_symbols to your User model.<br />
Permission denied: User.roles doesn't return an Array of Symbols ([#])<br />
Filter chain halted as [:filter_access_filter] rendered_or_redirected.</div></td></tr></tbody></table></div>
<p>In order to get things to work correctly with a User model, Roles model, and Roles_Users table for the &#8220;has_and_belongs_to_many&#8221; relationship, you need to make sure you&#8217;ve a method in your user model that &#8220;correctly&#8221; generates a &#8220;roles_symbol&#8221; array:<br />
<script src="http://gist.github.com/160692.js"></script></p>
<p><strong>Note</strong>: Make sure that you use the correct value of the filed in your roles model when serializing. The example used &#8220;title&#8221; but in my application I used &#8220;name&#8221; for the column that defined the role.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2009/08/03/using-declarative-association-with-habtm-relationships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 4 (Gumbo) &#8220;Application Descriptor Not Found&#8221; woes</title>
		<link>http://www.imarichardson.com/2009/07/15/flex-4-gumbo-application-descriptor-not-found-woes/</link>
		<comments>http://www.imarichardson.com/2009/07/15/flex-4-gumbo-application-descriptor-not-found-woes/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 04:46:34 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=262</guid>
		<description><![CDATA[Try as I might, I could not figure out for the life of me why my Application Descriptor file couldn&#8217;t be generated. I cleaned my application, built, and rebuilt, then even sought out on a completely unsuccessful &#8220;Google-ca-pade&#8221;. I had the correct AIR runtime version referenced and even had another application file in the project [...]]]></description>
			<content:encoded><![CDATA[<p>Try as I might, I could not figure out for the life of me why my Application Descriptor file couldn&#8217;t be generated. I cleaned my application, built, and rebuilt, then even sought out on a completely unsuccessful &#8220;Google-ca-pade&#8221;. I had the correct AIR runtime version referenced and even had another application file in the project building successfully, however the main mxml file continually gave me this error.</p>
<p>Finally, I stumbled upon, David Deraedt&#8217;s AIR Application Descriptor Manager. Honestly, I didn&#8217;t think much about it, and hadn&#8217;t much in terms of hopes, but after running through the settings for my file and saving it &#8230; eureka! Automatic building took over and I have a successful Application Descriptor.</p>
<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 61px;">
<dt class="wp-caption-dt"><a href="http://en.wikipedia.org/wiki/Image:Adobe_AIR_icon.png"><img title="Adobe AIR" src="http://upload.wikimedia.org/wikipedia/en/a/a4/Adobe_AIR_icon.png" alt="Adobe AIR" width="51" height="51" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:Adobe_AIR_icon.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p><strong>The culprit: a rogue slash &#8220;/&#8221; mysteriously placed in the original prevented the descriptor from being built.</strong></p>
<p><img class="alignleft" style="max-width: 800px;" src="http://farm4.static.flickr.com/3499/3721561843_48801dc9e9_o_d.png" alt="" width="556" height="299" /></p>
<p>Technorati Tags: <a class="performancingtags" rel="tag" href="http://technorati.com/tag/Flex4">Flex4</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/Gumbo">Gumbo</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/Troubleshooting">Troubleshooting</a></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/49e4dd9e-edf9-4f8e-b57f-7b17f960065b/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=49e4dd9e-edf9-4f8e-b57f-7b17f960065b" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2009/07/15/flex-4-gumbo-application-descriptor-not-found-woes/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>OSX SVN woes: client is too old to work with working copy</title>
		<link>http://www.imarichardson.com/2008/10/06/osx-svn-woes-client-is-too-old-to-work-with-working-copy/</link>
		<comments>http://www.imarichardson.com/2008/10/06/osx-svn-woes-client-is-too-old-to-work-with-working-copy/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 15:07:24 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Apple/Macintosh]]></category>
		<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[osx leopard troubleshooting subversion svn]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=216</guid>
		<description><![CDATA[If you are caught somewhere between subversion 1.4  and 1.5 then you&#8217;ll suddenly find yourself one day presented with the message: 
svn: This client is too old to work with working copy; please get a newer Subversion client
I originally found myself here while beta testing a new subversion client and inadvertently clicking &#8220;yes&#8221; I want to upgrade my working [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://subversion.tigris.org"><img class="alignleft size-full wp-image-217" title="subversion" align="left" src="http://www.imarichardson.com/wp-content/uploads/subversion.png" alt="" width="84" height="59" /></a>If you are caught somewhere between subversion 1.4  and 1.5 then you&#8217;ll suddenly find yourself one day presented with the message: <br/><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn: This client is too old to work with working copy; please get a newer Subversion client</div></div>
<p>I originally found myself here while beta testing a new subversion client and inadvertently clicking &#8220;yes&#8221; I want to upgrade my working directory. But that&#8217;s another story. Here&#8217;s what I did (I&#8217;m running Mac OSX 10.5 Leopard):</p>
<p> </p>
<ol>
<li><strong>Download and install the Subversion 1.5 binaries</strong> from <a title="OpenCollabNet" href="http://downloads.open.collab.net/binaries.html" target="_blank">OpenCollabNet</a> (via http://subversion.tigris.org/getting.html#osx). Once you download the .dmg, simply run the installer like you&#8217;d normally do any installer. You&#8217;d imagine that this would be all but it&#8217;s not because the new subversion installs to /opt/subversion/bin rather than /usr/bin.</li>
<li><strong>Update your path</strong> by either editing the &#8220;~/.profile&#8221; (for your individual user profile) or &#8220;/etc/profile&#8221; (for all system users). I chose to do this for my system as I used several accounts for different purposes. If the file doesn&#8217;t exist you need to create it. Then add the following line to the top of the file: 
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">export PATH=<span style="color:#006600; font-weight:bold;">/</span>opt<span style="color:#006600; font-weight:bold;">/</span>subversion:$PATH</div></div>
</li>
<li>Finally, <strong>rename the previous svn executable</strong>. You may find that you still cannot access subversion 1.5 if the 1.4 file is still available. Navigate to your /usr/bin folder and rename the old svn located there:
<ul>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#ff6633; font-weight:bold;">$sudo</span> mv svn svn.<span style="color:#9900CC;">old</span></div></div>
<li>Thanks much <a title="Coals [2] Newcastle" href="http://blog.coals2newcastle.com/2008/08/subversion-151-in-osx.html" target="_blank">Coals [2] Newcastle</a> for helping me with this one. </li>
</ul>
</li>
<li>Now when running svn &#8211;version you should see the 1.5 client referenced.</li>
</ol>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ svn <span style="color:#006600; font-weight:bold;">--</span>version svn, version 1.5.2 <span style="color:#006600; font-weight:bold;">&#40;</span>r32768<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; compiled Sep 19 2008, 14:38:15<br />
&nbsp; Copyright <span style="color:#006600; font-weight:bold;">&#40;</span>C<span style="color:#006600; font-weight:bold;">&#41;</span> 2000<span style="color:#006600; font-weight:bold;">-</span>2008 CollabNet.<br />
&nbsp; <span style="color:#9900CC;">Subversion</span> is <span style="color:#CC0066; font-weight:bold;">open</span> source software, see http:<span style="color:#006600; font-weight:bold;">//</span>subversion.<span style="color:#9900CC;">tigris</span>.<span style="color:#9900CC;">org</span><span style="color:#006600; font-weight:bold;">/</span><br />
&nbsp;This product includes software developed by CollabNet <span style="color:#006600; font-weight:bold;">&#40;</span>http:<span style="color:#006600; font-weight:bold;">//</span>www.<span style="color:#9900CC;">Collab</span>.<span style="color:#9900CC;">Net</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<br />
 </div></div>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2008/10/06/osx-svn-woes-client-is-too-old-to-work-with-working-copy/feed/</wfw:commentRss>
		<slash:comments>111</slash:comments>
		</item>
		<item>
		<title>Apache and Mongrel frustrations: 502,  503, Operation Not Permitted,  Proxy Error, &amp; Connection Refused Errors</title>
		<link>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/</link>
		<comments>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/#comments</comments>
		<pubDate>Fri, 30 May 2008 16:38:53 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[mongrel_cluster]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/?p=212</guid>
		<description><![CDATA[
For a good deal of time I&#8217;ve been experiencing numerous problems relating to mongrel and mongrel_cluster. I&#8217;ve received proxy errors from my main site:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server

Apache/2.2.3 (Red Hat) Server at [myserver.com] Port [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.imarichardson.com/wp-content/uploads/proxy_error1.png'><img src="http://www.imarichardson.com/wp-content/uploads/proxy_error1-300x114.png" alt="" title="proxy_error no_name" width="300" height="114" class="aligncenter size-medium wp-image-214" /></a><br />
For a good deal of time I&#8217;ve been experiencing numerous problems relating to mongrel and mongrel_cluster. I&#8217;ve received proxy errors from my main site:</p>
<blockquote><p><strong>Proxy Error</strong><br />
The proxy server received an invalid response from an upstream server.<br />
The proxy server could not handle the request <em><a href="https://app_url/">GET /</a></em>.</p>
<p>Reason: <strong>Error reading from remote server</strong></p>
<hr />
<address>Apache/2.2.3 (Red Hat) Server at [myserver.com] Port 443</address>
</blockquote>
<p>And when viewing the log files I was receiving errors like:<br />
<br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&#91;</span>Mon May 26 23:51:38 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> client sent HTTP<span style="color:#006600; font-weight:bold;">/</span>1.1 request without hostname <span style="color:#006600; font-weight:bold;">&#40;</span>see RFC2616 section 14.23<span style="color:#006600; font-weight:bold;">&#41;</span>: <span style="color:#006600; font-weight:bold;">*</span><br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8050 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 08:59:49 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8051 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed<br />
...<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Wed May 28 09:00:39 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> proxy: BALANCER: <span style="color:#006600; font-weight:bold;">&#40;</span>balancer:<span style="color:#006600; font-weight:bold;">//</span>url_cluster<span style="color:#006600; font-weight:bold;">&#41;</span>. <span style="color:#9900CC;">All</span> workers are <span style="color:#9966CC; font-weight:bold;">in</span> error state<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Fri May <span style="color:#006666;">30</span> 08:<span style="color:#006666;">15</span>:<span style="color:#006666;">10</span> <span style="color:#006666;">2008</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> proxy: error reading status line from remote server 127.0.0.1<br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Fri May <span style="color:#006666;">30</span> 08:<span style="color:#006666;">15</span>:<span style="color:#006666;">10</span> <span style="color:#006666;">2008</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>client xxx.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span>.<span style="color:#9900CC;">xxx</span><span style="color:#006600; font-weight:bold;">&#93;</span> proxy: Error reading from remote server returned by <span style="color:#006600; font-weight:bold;">/</span> ...</div></div>
<p>And this, too: <em>(<a href="http://wiki.slicehost.com/doku.php?id=common_deprec_setup_errors">I tried these instructions too, but didn&#8217;t work.</a>)</em><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8000 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>111<span style="color:#006600; font-weight:bold;">&#41;</span>Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8001 <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span> failed <br />
<span style="color:#006600; font-weight:bold;">&#91;</span>Thu May 29 03:47:24 2008<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>error<span style="color:#006600; font-weight:bold;">&#93;</span> ap_proxy_connect_backend disabling worker <span style="color:#9966CC; font-weight:bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span>127.0.0.1<span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>Additionally, I received &#8220;Operation Not Permitted&#8221; errors when trying to restart and/or stop the mongrel clusters:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> Operation <span style="color:#9966CC; font-weight:bold;">not</span> permitted <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Errno</span>::EPERM<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>1.8<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>mongrel<span style="color:#006600; font-weight:bold;">-</span>1.1.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:200:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`send_signal'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:240:in `</span>run<span style="color:#996600;">'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'</span><br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>1.8<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>mongrel<span style="color:#006600; font-weight:bold;">-</span>1.1.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:281<br />
&nbsp;<span style="color:#006600; font-weight:bold;">**</span> <span style="color:#006600; font-weight:bold;">&#91;</span>out :: 208.112.64.164<span style="color:#006600; font-weight:bold;">&#93;</span> from <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>local<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails:19:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`load'<br />
&nbsp;** [out :: 208.112.64.164] from /usr/local/bin/mongrel_rails:19<br />
&nbsp;** [out :: 208.112.64.164] Sending TERM to Mongrel at PID 18429...</span></div></div>
<h2>Solution</h2>
<p>I was able to resolve the issue by killing all the active Mongrel processes and then restarting manually. You can do this by:<br/><br />
<strong>1. Viewing all active mongrel processes:</strong><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ ps <span style="color:#006600; font-weight:bold;">-</span>aef <span style="color:#006600; font-weight:bold;">|</span> egrep mongrel<br />
root &nbsp; &nbsp; &nbsp;3156 &nbsp; &nbsp; 1 &nbsp;0 May15 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:03 <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>ruby <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails start <span style="color:#006600; font-weight:bold;">-</span>d <span style="color:#006600; font-weight:bold;">-</span>e production <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">p</span> 8090 <span style="color:#006600; font-weight:bold;">-</span>a 127.0.0.1 <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">P</span> log<span style="color:#006600; font-weight:bold;">/</span>mongrel.8090.<span style="color:#9900CC;">pid</span> <span style="color:#006600; font-weight:bold;">-</span>c <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current<br />
root &nbsp; &nbsp; &nbsp;3159 &nbsp; &nbsp; 1 &nbsp;0 May15 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:02 <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>ruby <span style="color:#006600; font-weight:bold;">/</span>usr<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>mongrel_rails start <span style="color:#006600; font-weight:bold;">-</span>d <span style="color:#006600; font-weight:bold;">-</span>e production <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">p</span> 8091 <span style="color:#006600; font-weight:bold;">-</span>a 127.0.0.1 <span style="color:#006600; font-weight:bold;">-</span><span style="color:#CC0066; font-weight:bold;">P</span> log<span style="color:#006600; font-weight:bold;">/</span>mongrel.8091.<span style="color:#9900CC;">pid</span> <span style="color:#006600; font-weight:bold;">-</span>c <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current</div></div>
<p>(The second number is the process id; that is the id you&#8217;ll use to kill the process.)<br />
<br/><br />
<strong>2. Killing each process id</strong> <br/><br />
&#8220;sudo kill -9 [process id]&#8220;, For example, to kill the first process listed above:<br />
<br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ sudo kill <span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span> <span style="color:#006666;">8090</span></div></div>
<p><br/><br />
<strong>3. Restarting your Mongrel instances</strong><br/></p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@imarichardson</span><span style="color:#006600; font-weight:bold;">&#93;</span>$ sudo &nbsp;mongrel_rails cluster::restart <span style="color:#006600; font-weight:bold;">--</span>clean <span style="color:#006600; font-weight:bold;">-</span>C <span style="color:#006600; font-weight:bold;">/</span>var<span style="color:#006600; font-weight:bold;">/</span>www<span style="color:#006600; font-weight:bold;">/</span>apps<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>app_directory<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>current<span style="color:#006600; font-weight:bold;">/</span>config<span style="color:#006600; font-weight:bold;">/</span>mongrel_cluster.<span style="color:#9900CC;">yml</span></div></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2008/05/30/apache-and-mongrel-frustrations-502-503-operation-not-permitted-proxy-error-connection-refused-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;sudo gem update rails&#8221; doesn&#8217;t work</title>
		<link>http://www.imarichardson.com/2008/02/08/207/</link>
		<comments>http://www.imarichardson.com/2008/02/08/207/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 16:04:05 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[upgrading]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2008/02/08/207/</guid>
		<description><![CDATA[I&#8217;ve finally gotten to a point where I have been ready to upgrade to Rails 2.0.2 on one of my production machines (running Red Hat Enterprise 5). I ran into a little snag in that when trying to update rails; no error or anything, just a response that Rails 1.2.3 was installed:
123456-bash-3.1$ sudo gem update [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://docs.google.com/a/imarichardson.com/File?id=dhrs78c7_10c6ctxn9c" style="float: right; margin-top: 1em; margin-bottom: 0px; margin-left: 0px; margin-right: 1em; width: 90px; height: 103.404px" id="o656" />I&#8217;ve finally gotten to a point where I have been ready to upgrade to Rails 2.0.2 on one of my production machines (running Red Hat Enterprise 5). I ran into a little snag in that when trying to update rails; no error or anything, just a response that Rails 1.2.3 was installed:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">-</span>bash<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">3.1</span>$ sudo gem update rails <br />
Password: <br />
Updating installed gems... <br />
<span style="color:#9900CC;">Attempting</span> remote update of rails <br />
Successfully installed rails<span style="color:#006600; font-weight:bold;">-</span>2.0.2 <br />
Gems: <span style="color:#006600; font-weight:bold;">&#91;</span>rails<span style="color:#006600; font-weight:bold;">&#93;</span> updated</div></td></tr></tbody></table></div>
<p>In order to get things working right I had to update the system files so everything would run:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">-</span>bash<span style="color:#006600; font-weight:bold;">-</span>3.1$ sudo gem update <span style="color:#006600; font-weight:bold;">--</span><span style="color:#CC0066; font-weight:bold;">system</span> <br />
Updating RubyGems... <br />
<span style="color:#9900CC;">Attempting</span> remote update of rubygems<span style="color:#006600; font-weight:bold;">-</span>update <br />
Successfully installed rubygems<span style="color:#006600; font-weight:bold;">-</span>update<span style="color:#006600; font-weight:bold;">-</span>0.9.4 <br />
Updating version of RubyGems to 0.9.4 <br />
Installing RubyGems 0.9.4</div></td></tr></tbody></table></div>
<p>Now running the update works.</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">-</span>bash<span style="color:#006600; font-weight:bold;">-</span>3.1$ sudo gem update <span style="color:#006600; font-weight:bold;">-</span>y rails <br />
Updating installed gems... <br />
<span style="color:#9900CC;">Bulk</span> updating Gem source index <span style="color:#9966CC; font-weight:bold;">for</span>: http:<span style="color:#006600; font-weight:bold;">//</span>gems.<span style="color:#9900CC;">rubyforge</span>.<span style="color:#9900CC;">org</span> <br />
Attempting remote update of rails <br />
<span style="color:#006600; font-weight:bold;">----------</span> this is where all the dependencies are updated <span style="color:#006600; font-weight:bold;">------------</span><br />
Gems: <span style="color:#006600; font-weight:bold;">&#91;</span>rails<span style="color:#006600; font-weight:bold;">&#93;</span> updated</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2008/02/08/207/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Subversion Bindings for Warehouse App</title>
		<link>http://www.imarichardson.com/2007/11/01/installing-subversion-bindings-for-warehouse-app/</link>
		<comments>http://www.imarichardson.com/2007/11/01/installing-subversion-bindings-for-warehouse-app/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 03:57:08 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[bindings]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[swig]]></category>
		<category><![CDATA[warehouse]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2007/11/01/installing-subversion-bindings-for-warehouse-app/</guid>
		<description><![CDATA[ 
A number of months ago ActiveReload came on the scene with a new application called &#8220;Warehouse&#8221; which makes for a really aesthetic and functional way of managing repositories in Subversion.
The app requires you to install the Ruby Subversion Bindings, and while it may seem quick in the instructions, it wasn&#8217;t like that for me [...]]]></description>
			<content:encoded><![CDATA[<p align="center"> <img src="http://www.imarichardson.com/wp-content/uploads/warehouse.png" alt="warehouse" border="0" /></p>
<p>A number of months ago <a href="http://www.ActiveReload.com">ActiveReload</a> came on the scene with a new application called <a href="http://warehouseapp.com/">&#8220;Warehouse&#8221;</a> which makes for a really aesthetic and functional way of managing repositories in Subversion.</p>
<p>The app requires you to install the Ruby Subversion Bindings, and while it <a href="http://warehouseapp.com/installing/ruby-subversion-bindings">may seem quick in the instructions</a>, it wasn&#8217;t like that for me installing on RHEL 5. (I&#8217;m following through the instructions <a href="http://warehouseapp.com/installing/ruby-subversion-bindings">listed here</a>).</p>
<p><strong>Be warned &#8211; you may want to go grab a cup of java and get comfortable, because this is a long one &#8230;<br />
</strong><br />
First of all I have a problem extracting and installing swig.<br />
<span id="more-204"></span></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf swig-1.3.31.tar.gz<br />
swig-1.3.31<span style="color: #000000; font-weight: bold;">/</span><br />
swig-1.3.31<span style="color: #000000; font-weight: bold;">/</span>Doc<span style="color: #000000; font-weight: bold;">/</span><br />
...<br />
swig-1.3.31<span style="color: #000000; font-weight: bold;">/</span>Doc<span style="color: #000000; font-weight: bold;">/</span>Manual<span style="color: #000000; font-weight: bold;">/</span>SWIGDocumentation.pdf<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">gzip</span>: stdin: unexpected end of <span style="color: #c20cb9; font-weight: bold;">file</span><br />
<span style="color: #c20cb9; font-weight: bold;">tar</span>: Unexpected EOF <span style="color: #000000; font-weight: bold;">in</span> archive<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span>: Unexpected EOF <span style="color: #000000; font-weight: bold;">in</span> archive<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span>: Error is not recoverable: exiting now</div></td></tr></tbody></table></div>
<p>I don&#8217;t know why it happened and why the file couldn&#8217;t extract so instead I went straight to the main sourceforge page (http://sourceforge.net/projects/swig/), download the latest build, and uploaded it to my server. Then follow the instructions using the new filename (for me it was &#8220;swig-1.3.32-rc1.tar.gz&#8221;).</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ tar xzvf swig<span style="color:#006600; font-weight:bold;">-</span>1.3.32<span style="color:#006600; font-weight:bold;">-</span>rc1.<span style="color:#9900CC;">tar</span>.<span style="color:#9900CC;">gz</span><br />
$ cd .<span style="color:#006600; font-weight:bold;">/</span>swig<span style="color:#006600; font-weight:bold;">-</span>1.3.32<span style="color:#006600; font-weight:bold;">-</span>rc1<br />
$ sudo .<span style="color:#006600; font-weight:bold;">/</span>configure<br />
$ sudo make<br />
$ sudo make install</div></td></tr></tbody></table></div>
<p>This got me through the ./configure, but during the make I received an error that pointed to a missing &#8220;g++&#8221;.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">/</span>Tools<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>depcomp: line 566: <span style="color: #7a0874; font-weight: bold;">exec</span>: <span style="color: #c20cb9; font-weight: bold;">g++</span>: not found<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>2<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Modules<span style="color: #000000; font-weight: bold;">/</span>allegrocl.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 127<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>home<span style="color: #000000; font-weight: bold;">/</span>richa088<span style="color: #000000; font-weight: bold;">/</span>swig-1.3.32-rc1<span style="color: #000000; font-weight: bold;">/</span>Source<span style="color: #ff0000;">'<br />
make[1]: *** [all] Error 2<br />
make[1]: Leaving directory `/home/richa088/swig-1.3.32-rc1/Source'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">source</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></td></tr></tbody></table></div>
<p>I then found out (by way of a 2 hour date with google) that by default RHEL5 doesn&#8217;t come with g++ installed. (I&#8217;m sure a much seasoned linuxologist would have figured it out quicker, but I digress.) So, <a href="http://www.linuxquestions.org/questions/linux-software-2/downgrade-g-467470/">using yum</a>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> gcc-c++<br />
...<br />
Transaction Test Succeeded<br />
Running Transaction<br />
Installing: libstdc++-devel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">######################### [1/2]</span><br />
Installing: gcc-c++ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">######################### [2/2]</span><br />
<br />
Installed: gcc-c++.i386 <span style="color: #000000;">0</span>:4.1.1-52.el5.2<br />
Dependency Installed: libstdc++-devel.i386 <span style="color: #000000;">0</span>:4.1.1-52.el5.2<br />
Complete<span style="color: #000000; font-weight: bold;">!</span></div></td></tr></tbody></table></div>
<p>In order to get the make to pass, I then had to re-run the configure. The make, and install succeeded afterwards.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<p>But it&#8217;s not over yet. For step 2, I ran then tried to run the &#8220;make swig-rb&#8221; and received another error regarding the Apache Portable Runtime not being installed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">============================================<br />
WARNING: skipping the build of mod_dav_svn<br />
<span style="color: #660033;">--with-apxs</span> or <span style="color: #660033;">--with-apache</span> must be used<br />
============================================<br />
configure: Apache Portable Runtime <span style="color: #7a0874; font-weight: bold;">&#40;</span>APR<span style="color: #7a0874; font-weight: bold;">&#41;</span> library configuration<br />
checking <span style="color: #000000; font-weight: bold;">for</span> APR... no<br />
configure: WARNING: APR not found<br />
The Apache Portable Runtime <span style="color: #7a0874; font-weight: bold;">&#40;</span>APR<span style="color: #7a0874; font-weight: bold;">&#41;</span> library cannot be found.<br />
Please <span style="color: #c20cb9; font-weight: bold;">install</span> APR on this system and supply the appropriate<br />
<span style="color: #660033;">--with-apr</span> option to <span style="color: #ff0000;">'configure'</span><br />
<br />
or<br />
<br />
get it with SVN and put it <span style="color: #000000; font-weight: bold;">in</span> a subdirectory of this <span style="color: #7a0874; font-weight: bold;">source</span>:<br />
...<br />
configure: error: no suitable apr found</div></td></tr></tbody></table></div>
<p><a href="http://forum.activereload.net/forums/8/topics/241">As this post reveals</a>, there is some newness between the Apache Portable Runtime (APR) and neon (don&#8217;t even ask me to explain) which make for an error in trying to install the bindings (the command &#8220;make swig-rb&#8221;). So to get by this, I followed the instructions by <a href="http://www.workingwithrails.com/person/5337-josh-goebel">Josh Goebel</a> at <a href="http://pastie.caboo.se/99772">this pastie</a> to get by. ***Note that on line 4 you need to omit the &#8220;tar.gz&#8221; as I&#8217;ve indicated below.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">cd</span> neon-0.27.1<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-ssl</span> <span style="color: #660033;">--with-libs</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><br />
...<br />
checking <span style="color: #000000; font-weight: bold;">for</span> expat.h... no<br />
checking <span style="color: #000000; font-weight: bold;">for</span> xml2-config... no<br />
configure: error: no XML parser was found: expat or libxml 2.x required</div></td></tr></tbody></table></div>
<p><strong>WOW!!! </strong>When it rains it pours &#8230; while running the first config for neon, the process stopped because I didn&#8217;t have an XML parser on the system. (I&#8217;d thought the folks who set it up had done so, but that wasn&#8217;t the case.) So I installed expat with:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ yum <span style="color: #c20cb9; font-weight: bold;">install</span> expat-devel<br />
...<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>1<span style="color: #000000; font-weight: bold;">/</span>1<span style="color: #7a0874; font-weight: bold;">&#41;</span>: expat-devel-1.95.8 100<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">|</span>=========================<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">130</span> kB &nbsp; &nbsp;00:00<br />
Running Transaction Test<br />
Finished Transaction Test<br />
Transaction Test Succeeded<br />
Running Transaction<br />
Installing: expat-devel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">######################### [1/1]</span><br />
<br />
Installed: expat-devel.i386 <span style="color: #000000;">0</span>:1.95.8-8.2.1<br />
Complete<span style="color: #000000; font-weight: bold;">!</span></div></td></tr></tbody></table></div>
<p>And after continuing through the remainder of the pastie, I&#8217;ve finally got subversion bindings installed! And now for the moment of truth &#8230;</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ -bash-3.1$ ruby <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'puts require(&quot;svn/core&quot;)'</span><br />
<span style="color: #c20cb9; font-weight: bold;">true</span></div></td></tr></tbody></table></div>
<p>Eureka! The test passed! Now I&#8217;ve got to actually install Warehouse &#8230; but I&#8217;ll save that for tomorrow. And I won&#8217;t even tell you how long it took me to finish all this stuff.</p>
<p>Here&#8217;s the complete <a href="http://pastie.caboo.se/99772">pastie</a> with my additions (depending on how your admin set things up you may have to sudo each line):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> expat-devel <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> you don<span style="color: #ff0000;">'t have an XML parser installed)<br />
$ cd /usr/local/src<br />
$ curl -O http://www.webdav.org/neon/neon-0.27.1.tar.gz<br />
$ tar zxvf neon-0.27.1.tar.gz<br />
$ cd neon-0.27.1<br />
$ ./configure --with-ssl --with-libs=/usr/local<br />
$ make<br />
$ sudo make install<br />
$ cd ..<br />
$ curl -O http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz<br />
$ curl -O http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz<br />
$ tar xzvf subversion-1.4.3.tar.gz<br />
$ tar xzvf subversion-deps-1.4.3.tar.gz<br />
$ cd subversion-1.4.3<br />
$ ./configure --prefix=/usr/local --with-openssl --with-ssl --with-zlib --with-neon=/usr/local<br />
$ make<br />
$ sudo make install<br />
$ make swig-rb<br />
$ make check-swig-rb (Most of these test'</span>s should pass<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> install-swig-rb</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2007/11/01/installing-subversion-bindings-for-warehouse-app/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>12 Profile Shortcuts I can&#8217;t live without</title>
		<link>http://www.imarichardson.com/2007/10/09/12-profile-shortcuts-i-cant-live-without/</link>
		<comments>http://www.imarichardson.com/2007/10/09/12-profile-shortcuts-i-cant-live-without/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 14:59:51 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2007/10/09/12-profile-shortcuts-i-cant-live-without/</guid>
		<description><![CDATA[If you&#8217;re a developer on a Mac or Linux box, building in Rails using Capistrano like me you can get really tired of having to &#8220;cd&#8221; to a 25 character long directory path 10 times a day while running all your script/&#8221;whatevers&#8221; while you work. Well, here&#8217;s my list of 12 shortcuts I can&#8217;t live [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.imarichardson.com/wp-content/uploads/rails.png" alt="Rails" align="right" />If you&#8217;re a developer on a Mac or Linux box, building in Rails using Capistrano like me you can get really tired of having to &#8220;cd&#8221; to a 25 character long directory path 10 times a day while running all your script/&#8221;whatevers&#8221; while you work. Well, here&#8217;s my list of 12 shortcuts I can&#8217;t live without.</p>
<p>If you&#8217;re on a Mac, you&#8217;ll need to edit your &#8220;/etc/profile&#8221; page and then type these in, so something like &#8220;$textedit /etc/profile&#8221; or  &#8220;$ mate /etc/profile&#8221; (if you are using <a href="http://macromates.com/">TextMate</a>) from your Terminal window will open your system profile.</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># /directories</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> gotoMyDir=<span style="color:#996600;">&quot;cd /Some/Path/To/A/Frequently/Accessed_Directory&quot;</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Rails</span><br />
<span style="color:#008000; font-style:italic;">#The next shortcut only opens up the rails directories I care about using TextMate</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> matedir=<span style="color:#996600;">&quot;mate app config lib db public test vendor/plugins &amp;amp;&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> ss=<span style="color:#996600;">&quot;./script/server&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> sc=<span style="color:#996600;">&quot;./script/console&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> sg=<span style="color:#996600;">&quot;./script/generate&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> sp=<span style="color:#996600;">&quot;./script/plugin&quot;</span><br />
<br />
<span style="color:#008000; font-style:italic;">#Rails Capistrano ... yes, I am using Capistrano 1.4.1 instead of 2.x</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> capd=<span style="color:#996600;">&quot;cap _1.4.1_ deploy&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> capdm=<span style="color:#996600;">&quot;cap _1.4.1_ deploy_with_migrations&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> capapache=<span style="color:#996600;">&quot;cap _1.4.1_ restart_apache&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> caprestart=<span style="color:#996600;">&quot;cap _1.4.1_ restart_mongrel_cluster&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> capstart=<span style="color:#996600;">&quot;cap _1.4.1_ start_mongrel_cluster&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">alias</span> capstop=<span style="color:#996600;">&quot;cap _1.4.1_ stop_mongrel_cluster&quot;</span></div></td></tr></tbody></table></div>
<p>Now what&#8217;s nice is that f I want to visit &#8220;my directory&#8221;, while in the terminal I just type&#8221;$ gotoMyDir&#8221;; if I need to run a capistrano &#8220;deploy_with_migrations&#8221; script (yes, I&#8217;m using 1.4.1 until a few more 2.0 updates finalize) I just type in &#8220;$ capdm&#8221; &#8230; you get the picture.</p>
<p>Nice indeed, and saves the keys!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2007/10/09/12-profile-shortcuts-i-cant-live-without/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install ImageMagick &amp; RMagick on RHEL5</title>
		<link>http://www.imarichardson.com/2007/07/06/install-imagemagick-rmagick-on-rhel5/</link>
		<comments>http://www.imarichardson.com/2007/07/06/install-imagemagick-rmagick-on-rhel5/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 13:49:10 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2007/07/06/install-imagemagick-rmagick-on-rhel5/</guid>
		<description><![CDATA[Are you trying to get Rmagick by way of Imagemagick on you RHEL5 box. Remember to use &#8220;yum&#8221; instead of &#8220;update2&#8243;.

 First you&#8217;ll need to install ImageMagick
[source:ruby]$ sudo yum install ImageMagick ImageMagick-devel[/source]
Now configure, setup and make
[source:ruby]
$ sudo mkdir /home/imins
$ cd /home/imins
$ sudo wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
$ sudo tar -zxvf ImageMagick.tar.gz
$ sudo cd ImageMagick*
$ sudo ./configure &#8211;prefix=/usr &#8211;enable-shared=yes
$ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails"><img src="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails" alt="Rails" align="right" height="62" width="49" /></a>Are you trying to get Rmagick by way of Imagemagick on you RHEL5 box. Remember to use &#8220;yum&#8221; instead of &#8220;update2&#8243;.</p>
<ol>
<li> First you&#8217;ll need to install ImageMagick
<p>[source:ruby]$ sudo yum install ImageMagick ImageMagick-devel[/source]</li>
<li>Now configure, setup and make
<p>[source:ruby]<br />
$ sudo mkdir /home/imins<br />
$ cd /home/imins<br />
$ sudo wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz<br />
$ sudo tar -zxvf ImageMagick.tar.gz<br />
$ sudo cd ImageMagick*<br />
$ sudo ./configure &#8211;prefix=/usr &#8211;enable-shared=yes<br />
$ sudo make &amp;&amp; make install<br />
[/source]<br/><em>Note: the last command (make &#038; make install) will take a long while to run</em></li>
<li>Install the RMagick gem[source:ruby]$ sudo gem install rmagick[/source]</li>
</ol>
<p>Thanks to <a href="https://www.ndchost.com/customer/support-center/index.php?x=&amp;mod_id=2&amp;id=16">NDCHost</a>,  <a href="http://www.cyberciti.biz/faq/howto-install-imagemagick-rpm/">Cyberciti</a>  and <a href="http://creativi.st/blog/articles/2006/01/12/rmagick-on-red-hat-enterprise-linux-rhel">Creativist</a> for the help.</p>
<p style="text-align: right; font-size: 8px">Blogged with <a href="http://www.flock.com/blogged-with-flock" title="Flock" target="_new">Flock</a></p>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right">Tags: <a href="http://technorati.com/tag/rmagick" rel="tag">rmagick</a>, <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/%20imagemagick" rel="tag"> imagemagick</a>, <a href="http://technorati.com/tag/%20rhel5" rel="tag"> rhel5</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2007/07/06/install-imagemagick-rmagick-on-rhel5/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Using SQL Server with Rails &#8230; again</title>
		<link>http://www.imarichardson.com/2007/07/02/using-sql-server-with-rails/</link>
		<comments>http://www.imarichardson.com/2007/07/02/using-sql-server-with-rails/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 16:09:43 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2007/07/02/using-sql-server-with-rails/</guid>
		<description><![CDATA[Last September I wrote about using FreeTDS for connecting a Rails app to a MS SQL Server Database. It looks like there may be an even easier/quicker way using these instructions from the MoleHill which talk of using the ADO.rb ruby files.
I&#8217;m actually in the process of setting up another application to use SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails"><img src="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails" alt="Rails" align="right" height="76" width="60" /></a>Last September I wrote about using <a href="http://www.imarichardson.com/2006/09/26/rubyonrails-using-mssql-server-and-freetds/" title="FreeTDS for connecting a Rails app to a MS SQL Server Database">FreeTDS for connecting a Rails app to a MS SQL Server Database</a>. It looks like there may be an even easier/quicker way using t<a href="http://www.themolehill.com/index.php/2006/10/13/connecting-to-a-microsoft-sql-server-from-a-rails-application/">hese instructions from the MoleHill</a> which talk of using the ADO.rb ruby files.</p>
<p><strike>I&#8217;m actually in the process of setting up another application to use SQL Server and am trying it out. I&#8217;ll see what happens&#8230;</strike></p>
<p>Nah, they are referencing the Ruby DBI modules and the ADO libs are only good if you are accessing from a Windows based machine. Oh, well &#8230; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2007/07/02/using-sql-server-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using 2 instances of Restful Authentication with different models</title>
		<link>http://www.imarichardson.com/2007/06/30/using-2-instances-of-restful-authentication-with-different-models/</link>
		<comments>http://www.imarichardson.com/2007/06/30/using-2-instances-of-restful-authentication-with-different-models/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 12:35:04 +0000</pubDate>
		<dc:creator>imarichardson</dc:creator>
				<category><![CDATA[Programming &#038; Development]]></category>

		<guid isPermaLink="false">http://www.imarichardson.com/2007/06/30/using-2-instances-of-restful-authentication-with-different-models/</guid>
		<description><![CDATA[In the process of building a Rails app for my day job, I found myself actually needing 2 independent forms of authentication primarily because I&#8217;ve 2 independent models that &#8220;users&#8221; authenticate as.
To explain a bit more, my application has 2 points of entry:

&#8220;Applicant&#8221; &#8211; enters the system and does things like applicants do (fill out [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails"><img src="http://www.imarichardson.com/wp-content/uploads/rails.png" title="Rails" alt="Rails" align="left" height="93" width="73" /></a>In the process of building a Rails app for my day job, I found myself actually needing 2 independent forms of authentication primarily because I&#8217;ve 2 independent models that &#8220;users&#8221; authenticate as.</p>
<p>To explain a bit more, my application has 2 points of entry:</p>
<ol>
<li>&#8220;Applicant&#8221; &#8211; enters the system and does things like applicants do (fill out forms, check history, etc.</li>
<li>&#8220;User&#8221; &#8211; enters the system to manage applicants, and besides, has multiple types of security roles in the system.</li>
</ol>
<p>So in each of these circumstances the models are different, the methods are different, and it seems certain that the authentication is different. Seeing as how I really like the restful_authentication plugin, I decided to use it for both authentication schemes.</p>
<ol>
<li> To do this run your restful authenticated generator for the first model:
<p>[source:ruby]$ ./script/generate authenticated user sessions &#8211;include-activation[/source]</li>
<li>Once your generator has run you need to rename the &#8220;[rails_root]/lib/authenticated_system.rb&#8221; and &#8220;[rails_root]/lib/authenticated_system_helper.rb&#8221;. If not, then the next time you try to run the generator you&#8217;ll be asked to overwrite the value. I just pre-pended the name of my model; i.e. &#8220;applicant_autheniticated_system.rb&#8221;</li>
<li>You also need to rename the classes themselves, so open up those 2 files and change the first line to match the value you just renamed it to. So for example, my &#8220;applicant_authenticated_system.rb&#8221; value would have the first line of: [source:ruby]module ApplicantAuthenticatedSystem[/source]. <em>As a special note, please be sure to remember that the name does not include underscore values, so if you&#8217;ve placed them in the name of the file, the class name will omit them and only use CamelCase.</em></li>
<li>Finally, in your controllers where you include the AuthenticatedSystem use the new name, so for my controllers I would place [source:ruby]include ApplicantAuthenticatedSystem[/source].</li>
<li>Repeat these steps for the next model you wish to authenticate by, using the new model and you&#8217;ll have another restfully authenticated sytem, too.</li>
</ol>
<p><em>So I&#8217;m sure you could take the restful_authentication gem and refactor it to use multiple instances, but this way I have 2 separate/independent instances of authentication. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.imarichardson.com/2007/06/30/using-2-instances-of-restful-authentication-with-different-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
