<?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>SmartLogic Solutions Blog &#187; John Trupiano</title>
	<atom:link href="http://blog.smartlogicsolutions.com/author/jtrupiano/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smartlogicsolutions.com</link>
	<description>News and updates from the people at SmartLogic Solutions</description>
	<lastBuildDate>Tue, 30 Nov 2010 21:39:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>BohConf 2010: A Retrospective</title>
		<link>http://blog.smartlogicsolutions.com/2010/06/22/railsconf-bohconf-2010-a-retrospective/</link>
		<comments>http://blog.smartlogicsolutions.com/2010/06/22/railsconf-bohconf-2010-a-retrospective/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 14:54:10 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[Baltimore]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[bohconf]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[railsconf]]></category>
		<category><![CDATA[smartlogic]]></category>
		<category><![CDATA[unconf]]></category>
		<category><![CDATA[unconference]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=913</guid>
		<description><![CDATA[After an exhilarating week of hosting the Rails community in Baltimore for RailsConf, I thought it&#8217;d be helpful to share the lessons that we learned organizing BohConf. Community Code Drives Rock! We had a strong showing of open source authors including Wayne Seguin, Gregory Brown, Aslak Hellesøy, Chris Eppstein, Nick Gauthier and various members of [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_948" class="wp-caption alignright" style="width: 160px"><a href="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/nerdy_boh_02.png"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/nerdy_boh_02-150x150.png" alt="BohConf 2010" title="BohConf 2010" width="150" height="150" class="size-thumbnail wp-image-948" /></a><p class="wp-caption-text">BohConf 2010</p></div>
<p>After an exhilarating week of hosting the Rails community in Baltimore for <a href="http://en.oreilly.com/rails2010">RailsConf</a>, I thought it&#8217;d be helpful to share the lessons that we learned organizing <a href="http://bohconf.com">BohConf</a>.</p>
<h3>Community Code Drives Rock!</h3>
<p>We had a strong showing of open source authors including <a href="http://github.com/wayneeseguin">Wayne Seguin</a>, <a href="http://github.com/sandal">Gregory Brown</a>, <a href="http://github.com/aslakhellesoy">Aslak Hellesøy</a>, <a href="http://github.com/chriseppstein">Chris Eppstein</a>, <a href="http://github.com/ngauthier">Nick Gauthier</a> and various members of <a href="http://github.com/thoughtbot">Thoughtbot crew</a>.  Wayne (<a href="http://github.com/wayneeseguin/rvm">rvm</a>) and Greg (<a href="http://github.com/sandal/prawn">prawn</a>) in particular raved about the contributions they were able to make to their projects.  Hey, I even got a new release of <a href="http://github.com/jtrupiano/timecop">Timecop</a> out thanks to a patch from <a href="http://github.com/lmarburger">Larry Marburger</a>.  Other well known OSS authors that dropped by included <a href="http://github.com/technoweenie">Rick Olson</a>, <a href="http://github.com/peakpg">Patrick Peak</a>, and <a href="http://github.com/technicalpickles">Josh Nichols</a>. If you were there and we missed you, please drop us a line in the comments!</p>
<p><span id="more-913"></span></p>
<h3>Employ Signage Everywhere</h3>
<div id="attachment_939" class="wp-caption alignright" style="width: 310px"><a href="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/IMAG0022.jpg"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/IMAG0022-300x179.jpg" alt="The Vim session at Monday&#039;s BarCamp (photo courtesy of Nick Gauthier)" title="The Vim session at Monday&#039;s BarCamp" width="300" height="179" class="size-medium wp-image-939" /></a><p class="wp-caption-text">The Vim session at Monday's BarCamp (photo courtesy of Nick Gauthier)</p></div>
<p>One problem that we had was that people entering BohConf did not have a sense of what was actually taking place.  Despite having a <a href="http://wiki.github.com/smartlogic/BohConf/schedule">schedule posted online</a>, it was often not clear what was underway.  During the community code drives, we should have had signs next to each table pointing out which OSS authors were there to work on which projects.  During the BarCamps, we could have similarly posted signs that indicated which discussions were happening at which tables.</p>
<h3>Publish Live Updates to the Website</h3>
<p>The thing about being internet (nerd) famous is that that doesn&#8217;t necessarily mean that anyone knows what you look like.  It would have been cool to post photos on the website of the OSS authors who were currently working the Community Code Drive.  Similarly we could have posted the current BarCamp sessions on the website.  A countdown to the start and end of the programming contest would have been cool too.</p>
<h3>Programming Contests Rock!</h3>
<div class="wp-caption alignright" style="width: 310px"><object width="300" height="241"><param name="movie" value="http://www.youtube.com/v/oqBDtAWb2u8&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/oqBDtAWb2u8&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="241"></embed></object><p class="wp-caption-text">Aaron Scruggs' programming challenge submission</p></div>
<p>Give a bunch of nerds a dataset, a deadline, and no rules, and you get some pretty awesome efforts.  Our client <a href="http://spotcrime.com/">SpotCrime</a> made available a dataset of crimes in Maryland in the past couple of months.  <a href="https://twitter.com/wearefound">Tim Johnson</a> submitted a <a href="http://tweetphoto.com/26375355">processing.rb time lapse visualization</a>, <a href="http://github.com/ascruggs">Aaron Scruggs</a> submitted a super cool and clever <a href="http://talesofastartupjunky.com/blog/?p=33">gource visualization</a>, and Greg Brown and several members of his crew (Jia, Jordan and Chenoa) showed a lot of creativity with their submission of <a href="http://spotthebaddy.heroku.com/">Spot the Baddy</a>, a simple but fun interactive game where you can catch the bad guy!</p>
<h3>Advertise the Programming Contest Better</h3>
<p>While we were very happy with the submissions that we received for the programming contest, we felt that not nearly enough people were aware that it was taking place.  Which also means that nobody knew we were giving out a $100 visa card to the best submission.</p>
<h3>A Schedule is Important</h3>
<p>When running an unconf for three days, you cannot simply throw out all semblance of organization and expect a success.  With various people responsible for different aspects of BohConf, it was very helpful to be able to refer to the schedule when explaining what was happening at BohConf.  Furthermore, it allowed us to communicate specifics well ahead of time via Twitter to those who wished to participate.</p>
<h3>Code Retreats Rock!</h3>
<div id="attachment_935" class="wp-caption alignright" style="width: 310px"><a href="http://www.flickr.com/photos/oreillyconf/4682963441/in/set-72157624231740192/"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/4682963441_e6a9191b5d-300x199.jpg" alt="Matt Scilipoti running the Code Retreat (photo courtesy of James Duncan Davidson)" title="Matt Scilipoti running the Code Retreat" width="300" height="199" class="size-medium wp-image-935" /></a><p class="wp-caption-text">Matt Scilipoti running the Code Retreat (photo courtesy of James Duncan Davidson)</p></div>
<p>&#8230;but perhaps it wasn&#8217;t the best choice to displace another BarCamp session.  After a wildly successful BarCamp Monday afternoon, many folks returned Tuesday looking for another.  Though the code retreat was clearly appreciated by the dozen or so folks that participated, there seemed to be a lot more interest in the BarCamp.</p>
<h3>Momentum Slowed</h3>
<p>Considering that Monday was tutorial day, it was unrealistic to expect us to maintain the same level of participation Tuesday and Wednesday.  Not only was there a big dropoff from Monday to Tuesday, but there was another one from Tuesday to Wednesday. BarCamp Wednesday afternoon was less successful than Monday&#8217;s, the discussion groups dissipated before we even got to the last session.  It&#8217;s also worth noting that those of us running BohConf were running on fumes by that point which likely contributed to the loss of momentum.</p>
<h3>We Didn&#8217;t Market SmartLogic Well Enough</h3>
<p>While <a href="http://smartlogicsolutions.com">SmartLogic</a> is instrumental to the <a href="http://bmoreonrails.org">B&#8217;more on Rails</a> community (as a sponsor and organizer), BohConf was actually undertaken entirely by <a href="http://smartlogicsolutions.com/our-team">our team at SmartLogic</a>.  We felt that we missed a big opportunity to establish our company and individuals as more visible members of the Rails community.  Our team members should have all had shirts, and we should have given away stickers and buttons to all attending BohConf.</p>
<h3>Encourage Conversation</h3>
<div id="attachment_946" class="wp-caption alignright" style="width: 310px"><a href="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/IMAG0024.jpg"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2010/06/IMAG0024-300x179.jpg" alt="A group discussion at BohConf (photo courtesy of Nick Gauthier)" title="A group discussion at BohConf" width="300" height="179" class="size-medium wp-image-946" /></a><p class="wp-caption-text">A group discussion at BohConf (photo courtesy of Nick Gauthier)</p></div>
<p>A large format session at an event like RailsConf scales pretty well. As far as you can project a speakers image (in time and space), that&#8217;s how many people you can reach. Open space events like BohConf scale less well because the effects are personal. The benefit of attending this kind of event is a lot more subjective, because each person&#8217;s experience is different. This means it&#8217;s vital that you give plenty of opportunities for people to start conversations. The BarCamp format isn&#8217;t about presentation topics as ending points, they&#8217;re conversation starters. The folks who got the most out of the event seemed to be the ones most open to meeting new people and sharing their story.
</p>
<p>A fantastic way to get people involved is to simply encourage them to ask, &#8220;What are you working on?&#8221; Follow up with, &#8220;tell me about that&#8221; and most geeks, passionate about their craft and otherwise quiet, will talk for an hour.</p>
<h3>Don&#8217;t Be Shy about Asking for Help Promoting</h3>
<p>Though we had about 100 followers prior to the start of BohConf, we failed to reach a large segment of the RailsConf attendees before the conference started.  Attendee after attendee that I spoke to were hearing about BohConf for the very first time.  We should have reached out to Chad, DHH and others to talk about BohConf in the weeks leading up to it. Even a few tweets would&#8217;ve given the event a nice bump.</p>
<h3>Get a Bigger Room Next Time</h3>
<p>Despite the waning momentum as the days went on, we were still overpacked in the conference room that we had available.  Luckily on Monday we were able to hijack the adjacent media room for our use.  Otherwise we would have had to turn away to half of the 80+ folks hanging out during the peak.</p>
<h3>Finally</h3>
<p>We had an absolute blast organizing BohConf for the community.  Practically all feedback we received was overwhelmingly positive.  And there are rumors that we&#8217;ll be asked to put it on again next year.  Whether or not we&#8217;re the ones to undertake it, we hope that these notes will aid those embarking on similar endeavors.</p>
<p>An extra special thanks to <a href="http://github.com/abachman">Adam Bachman</a>, <a href="http://github.com/ngauthier">Nick Gauthier</a>, <a href="http://smartlogicsolutions.com/ryan">Ryan DeStefano</a> and <a href="http://github.com/mattscilipoti">Matt Scilipoti</a> for their efforts in helping to run BohConf.</p>
<p>If you have any comments or critiques of BohConf, please leave a comment below.  Thanks to all those who attended!</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2009/05/05/smartlogic-wants-to-clean-up-twitter-introduces-shouldirtcom/" rel="bookmark" class="crp_title">SmartLogic Wants to Clean Up Twitter, Introduces ShouldIRT.com</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/11/12/watch-multiple-logs-in-a-single-terminal/" rel="bookmark" class="crp_title">Watch Multiple Logs in a Single Terminal</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/10/14/facebox-with-prototype/" rel="bookmark" class="crp_title">Facebox With Prototype</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/12/10/why-were-excited-about-the-maryland-tech-crawl/" rel="bookmark" class="crp_title">Why We&#8217;re Excited about the Maryland Tech Crawl</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/08/21/getting-subclipse-to-work-in-gandymede-eclipse-34/" rel="bookmark" class="crp_title">Getting Subclipse to Work in Gandymede (Eclipse 3.4)</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2010/06/22/railsconf-bohconf-2010-a-retrospective/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Directory Conventions for Rack Middleware RubyGems</title>
		<link>http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/</link>
		<comments>http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:48:27 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[middleware]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=896</guid>
		<description><![CDATA[I just wanted to make a quick note about directory conventions for rack middleware gems. For all gems you should follow the convention of housing all of your code inside a single file and directory of the same name as your gem within lib, e.g. $> ls -l ~/projects/timecop/lib drwxr-xr-x 5 john staff 170 Jan [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to make a quick note about directory conventions for rack middleware gems.  For all gems you should follow the convention of housing all of your code inside a single file and directory of the same name as your gem within lib, e.g.</p>
<p><code><br />
$> ls -l ~/projects/timecop/lib<br />
drwxr-xr-x  5 john  staff  170 Jan 14 20:31 timecop<br />
-rw-r--r--  1 john  staff   82 Jan 14 20:31 timecop.rb<br />
</code></p>
<p>The reason for this is related to how RubyGems hijacks Ruby&#8217;s require method.  When a gem is activated its lib/ folder is added to the load path.  This means that anything inside that directory is now accessible via the require method.  In order to avoid file naming collisions across gems, you must name these exactly the same as your gem. (see <a href="http://i-dont-trust-your-code.heroku.com/">slides for I Don&#8217;t Trust Your Code</a> for a more complete discussions of this)</p>
<p>However, this is slightly different with rack gems.  The convention for naming rack middleware is by using a dash, e.g. rack-rewrite.  The convention for requiring rack middleware though is to replace that dash with a slash, e.g. <code>require 'rack/rewrite'</code>.</p>
<p>The convention I&#8217;ve adopted for structuring rack middleware within a gem is to include a file by the same name as the gem and a rack directory in lib/, and then to include the second part of the middleware name as a subdirectory under that.</p>
<p><code><br />
~/projects/rack-rewrite (master) $> ls -l lib/<br />
total 8<br />
drwxr-xr-x  4 john  staff  136 Apr 17 18:02 rack<br />
-rw-r--r--@ 1 john  staff   22 Apr 17 18:02 rack-rewrite.rb</p>
<p>~/projects/rack-rewrite (master) $> ls -l lib/rack<br />
total 8<br />
drwxr-xr-x  3 john  staff  102 May 13 11:09 rewrite<br />
-rw-r--r--@ 1 john  staff  827 Apr 17 18:02 rewrite.rb<br />
</code></p>
<p>This allows my users to use either <code>require 'rack-rewrite'</code> or <code>require 'rack/rewrite'</code>.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/" rel="bookmark" class="crp_title">Rack::Rewrite for Site Maintenance and Downtime</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/" rel="bookmark" class="crp_title">Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/05/26/including-external-rake-files-in-your-projects-rakefile-keep-your-rake-tasks-organized/" rel="bookmark" class="crp_title">Including external .rake files in your project&#8217;s Rakefile &#8212; keep your rake tasks organized!</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rack::Rewrite 1.0.0 Released</title>
		<link>http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/</link>
		<comments>http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:25:16 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[rack-rewrite]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubygem]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=893</guid>
		<description><![CDATA[Rack::Rewrite 1.0.0 has just been released. To install simply run: gem install rack-rewrite. Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules. Documentation is hosted at RubyForge. The source code is hosted at GitHub. Updates include: [...]]]></description>
			<content:encoded><![CDATA[<p>Rack::Rewrite 1.0.0 has just been released.  To install simply run: <code>gem install rack-rewrite</code>.</p>
<p>Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules.</p>
<p>Documentation is hosted at <a href="http://johntrupiano.rubyforge.org/rack-rewrite/">RubyForge</a>.  The source code is hosted at <a href="http://github.com/jtrupiano/rack-rewrite">GitHub</a>.</p>
<p>Updates include:</p>
<p><span id="more-893"></span></p>
<p><strong>API</strong></p>
<ul>
<li>Fix rack 1.1.0 / rails3 compatibility by eliminating reliance on REQUEST_URI env param.  Paths are now constructed with PATH_INFO and QUERY_STRING</li>
<li>Follow rack directory/require convention: require &#8216;rack/rewrite&#8217; instead of &#8216;rack-rewrite&#8217;</li>
<li>Include an HTML anchor tag linked to where the URL being redirected to in the body of 301&#8242;s and 302&#8242;s</li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/" rel="bookmark" class="crp_title">Directory Conventions for Rack Middleware RubyGems</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/" rel="bookmark" class="crp_title">Rack::Rewrite for Site Maintenance and Downtime</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/" rel="bookmark" class="crp_title">Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/" rel="bookmark" class="crp_title">Timecop 0.3.0 Released</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rack::Rewrite 0.2.1 Released</title>
		<link>http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/</link>
		<comments>http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 22:51:29 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[rack-rewrite]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubygem]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=820</guid>
		<description><![CDATA[Rack::Rewrite 0.2.1 has just been released. To install simply run: gem install rack-rewrite. Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules. Documentation is hosted at RubyForge. The source code is hosted at GitHub. Updates include: [...]]]></description>
			<content:encoded><![CDATA[<p>Rack::Rewrite 0.2.1 has just been released.  To install simply run: <code>gem install rack-rewrite</code>.</p>
<p>Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules.</p>
<p>Documentation is hosted at <a href="http://johntrupiano.rubyforge.org/rack-rewrite/">RubyForge</a>.  The source code is hosted at <a href="http://github.com/jtrupiano/rack-rewrite">GitHub</a>.</p>
<p>Updates include:</p>
<p><span id="more-820"></span></p>
<p><strong>API</strong></p>
<ul>
<li>Implement $&#038; substitution pattern (thanks to <a href="http://github.com/bhb">Ben Brinckerhoff</a>)</li>
</ul>
<p><strong>Maintenance</strong></p>
<ul>
<li>Ignore empty captures instead of failing during subsitution (thanks to <a href="http://github.com/bhb">Ben Brinckerhoff</a>)</li>
<li>Play nice with Rack::Test requests which only set PATH_INFO and not REQUEST_URI (thanks to <a href="http://github.com/docunext">@docunext</a>)</li>
<li>Use QUERY_STRING instead of QUERYSTRING as per Rack spec.  Closes Issue #1.</li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/" rel="bookmark" class="crp_title">Directory Conventions for Rack Middleware RubyGems</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/" rel="bookmark" class="crp_title">Rack::Rewrite for Site Maintenance and Downtime</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/" rel="bookmark" class="crp_title">Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/" rel="bookmark" class="crp_title">Timecop 0.3.0 Released</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why We&#8217;re Excited about the Maryland Tech Crawl</title>
		<link>http://blog.smartlogicsolutions.com/2009/12/10/why-were-excited-about-the-maryland-tech-crawl/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/12/10/why-were-excited-about-the-maryland-tech-crawl/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:53:46 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[Company News]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[mdtechcrawl]]></category>
		<category><![CDATA[techcrawl]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=800</guid>
		<description><![CDATA[SmartLogic has teamed up with mp3Car.com and the Emerging Technology Centers (ETC) to create the Maryland Tech Crawl, an annual technology show and tell event to showcase the technologies being developed in our region. We already have commitments from 20 presenting companies and more than 140 attendee registrations. We expect to have about 200 participants [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://smartlogicsolutions.com/">SmartLogic</a> has teamed up with <a href="http://www.mp3car.com/">mp3Car.com</a> and the <a href="http://www.mp3car.com/">Emerging Technology Centers</a> (ETC) to create the <a href="http://mdtechcrawl.com">Maryland Tech Crawl</a>, an annual technology show and tell event to showcase the technologies being developed in our region.  We already have commitments from 20 presenting companies and more than 140 attendee registrations.  We expect to have about 200 participants in total.</p>
<p><div id="attachment_811" class="wp-caption alignright" style="width: 160px"><a href="http://mdtechcrawl.com"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2009/12/techcrawl_logo2-150x150.png" alt="Maryland Tech Crawl" title="Maryland Tech Crawl Logo" width="150" height="150" class="size-thumbnail wp-image-811" /></a><p class="wp-caption-text">Maryland Tech Crawl</p></div><br />
The Tech Crawl is being held Wednesday, December 16 from 4:30PM to 7:30PM at <a href="http://tinyurl.com/etccanton">ETC&#8217;s Canton location</a>.</p>
<p><span id="more-800"></span></p>
<h2>Why create another technology event?</h2>
<p>It&#8217;s a good question&#8211; I think a lot of folks feel like there&#8217;s been a deluge of events in the past year &#8212; Innovate, Ignite, Refresh, TEDx, TechNite, Tech Cocktail, BootstrapMD, Outlet, Barcamp, not to mention the myriad of local user groups &#8212; so why create the Tech Crawl?</p>
<p>While I love all of these events, I feel that none of them provide a venue for our entrepreneurs to actually showcase their technologies.  The Tech Crawl is primarily a &#8220;show and tell&#8221; event.  It&#8217;s an opportunity for our community to get acquainted with the superb work that our technology entrepreneurs are pouring their blood and sweat into.</p>
<h2>Why did SmartLogic want to get involved?</h2>
<p>As an active member in both the business and technology communities in the mid-Atlantic region, I felt that I was still in the dark about the work a lot of companies were doing.  I&#8217;ve noticed that the most interesting innovations are achieved by folks who are not out actively networking.  Just consider the nature of a technology startup&#8211; you&#8217;re either building or selling, but not necessarily marketing or showcasing on a large scale.  I thought there was room for an event that brought the community to the entrepreneurs.</p>
<h2>Who am I excited to see?</h2>
<ul>
<li><strong><a href="http://www.juxtopia.com/">Juxtopia</a></strong>: these guys are doing some really cool stuff in the realm of wearable tech.  I can&#8217;t wait to see the actual equipment!</li>
<li><strong><a href="http://dirdim.com/">Direct Dimensions</a></strong>: they do some impressive work in 3D scanning and modeling.  They were recently recognized in the BBJ for work they&#8217;re doing digitizing museum collections.</li>
<li><strong><a href="http://videntity.com/">Videntity</a></strong>: this team has been developing identity verification software that allows doctors to more easily exchange sensitive information securely.</li>
</ul>
<p>Obviously I&#8217;m also excited to see the media (<a href="http://baltimorebusinessjournal.com/">BBJ</a>, <a href="http://www.baltimoresun.com/">Sun</a>, <a href="http://bmoremedia.com/">BmoreMedia</a>, and <a href="http://marioa.squarespace.com/">Mario Armstrong</a>, tech contributor for NPR, CNN, and Sirius XM Radio) all come out to cover the Tech Crawl.</p>
<p>If you haven&#8217;t already signed up to attend, please <a href="http://mdtechcrawl.eventbrite.com/">register online</a>.  If you&#8217;d like to present your product please send an email to <a href="mailto:fgursel@etcbaltimore.com">fgursel@etcbaltimore.com</a>.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/06/22/railsconf-bohconf-2010-a-retrospective/" rel="bookmark" class="crp_title">BohConf 2010: A Retrospective</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/03/05/recap-of-the-first-baltimore-angels-meetup/" rel="bookmark" class="crp_title">Recap of the First Baltimore Angels Meetup</a></li><li><a href="http://blog.smartlogicsolutions.com/2007/03/29/adobe-apollo-download/" rel="bookmark" class="crp_title">Adobe Apollo has 40,000 downloads</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/" rel="bookmark" class="crp_title">Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/05/27/flash-player-10-peer-to-peer-faq/" rel="bookmark" class="crp_title">Flash Player 10 Peer-to-Peer FAQ</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/12/10/why-were-excited-about-the-maryland-tech-crawl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Timecop 0.3.4 Released</title>
		<link>http://blog.smartlogicsolutions.com/2009/12/07/timecop-0-3-4-released/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/12/07/timecop-0-3-4-released/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 21:39:06 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TATFT]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[rubygem]]></category>
		<category><![CDATA[tatft]]></category>
		<category><![CDATA[timecop]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=794</guid>
		<description><![CDATA[Timecop 0.3.4 has just been released. To install simply run: gem install timecop. Timecop is a RubyGem providing &#8220;time travel&#8221; and &#8220;time freezing&#8221; capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. Documentation is hosted at RubyForge. The source code [...]]]></description>
			<content:encoded><![CDATA[<p>Timecop 0.3.4 has just been released.  To install simply run: <code>gem install timecop</code>.</p>
<p>Timecop is a RubyGem providing &#8220;time travel&#8221; and &#8220;time freezing&#8221; capabilities, making it dead simple to test time-dependent code.  It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.</p>
<p>Documentation is hosted at <a href="http://johntrupiano.rubyforge.org/timecop/">RubyForge</a>.  The source code is hosted at <a href="http://github.com/jtrupiano/timecop">GitHub</a>.</p>
<p>Updates include:</p>
<p><span id="more-794"></span></p>
<p><strong>Maintenance</strong></p>
<ul>
<li>Fix various timezone-related issues.  Notably, when traveling to a DateTime<br />
    instance specified in a non-local timezone, convert provided DateTime<br />
    instance to a local instance and return that from DateTime.now.<br />
    Code contributed by Michaël Witrant [<a href="http://github.com/piglop">piglop</a>]
</li>
<li>Fix bug that would not allow Timecop to be used when Ruby&#8217;s &#8216;date&#8217;<br />
    library had not been previously loaded.<br />
    Code contributed by Tuomas Kareinen [<a href="http://github.com/tuomas">tuomas</a>]
</li>
<li>Fix bug when traveling to a DateTime across a DST boundary that<br />
    resulted in DateTime&#8217;s being off by an hour.
</li>
<li>Migrate argument parsing into Timecop::TimeStackItem to reduce the<br />
    responsibility of the Timecop class.
</li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/" rel="bookmark" class="crp_title">Timecop 0.3.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/" rel="bookmark" class="crp_title">Timecop 0.2.0 Released: Freeze and Rebase Time in Ruby</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/11/19/timecop-freeze-time-in-ruby-for-better-testing/" rel="bookmark" class="crp_title">Timecop: Freeze Time in Ruby for Better Testing</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/12/07/timecop-0-3-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</title>
		<link>http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 14:20:20 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[googleanalytics]]></category>
		<category><![CDATA[jtrupiano]]></category>
		<category><![CDATA[rack-rewrite]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=718</guid>
		<description><![CDATA[At SmartLogic we recently rebuilt our website in rails. The previous version was a MediaWiki installation with a ton of content that had garnered a decent bit of Google juice that we did not want to lose. By setting up 301 permanent redirects for the old URL&#8217;s, we can hold onto that juice. Enter Rack::Rewrite. [...]]]></description>
			<content:encoded><![CDATA[<p>At SmartLogic we recently rebuilt our <a href="http://www.smartlogicsolutions.com">website</a> in rails.  The previous version was a MediaWiki installation with a ton of content that had garnered a decent bit of Google juice that we did not want to lose.  By setting up 301 permanent redirects for the old URL&#8217;s, we can hold onto that juice.</p>
<p><span id="more-718"></span></p>
<div id="attachment_762" class="wp-caption alignright" style="width: 160px"><a href="http://blog.smartlogicsolutions.com/wp-content/uploads/2009/11/Picture-2.png"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2009/11/Picture-2-150x150.png" alt="Google Analytics Navigation" title="Google Analytics Navigation" width="150" height="150" class="size-thumbnail wp-image-762" /></a><p class="wp-caption-text">Google Analytics Navigation</p></div>
<p>Enter Rack::Rewrite.  <a href="http://github.com/jtrupiano/rack-rewrite">Rack::Rewrite</a> is a <a href="http://rack.rubyforge.org/">Rack</a> middleware for defining and applying rewrite rules.  Though it&#8217;s not a full replacement for <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">Apache&#8217;s mod_rewrite</a>, a great deal of rules I&#8217;ve previously written in Apache config files can be replaced by Rack::Rewrite.  Run <code>gem install rack-rewrite</code> to install the gem.</p>
<p>In order to determine which URL&#8217;s were most important to issue 301&#8242;s for, we turned to Google Analytics.  By reviewing the most popular landing pages of the past two months from our site, we were able to methodically write our redirect rules.</p>
<div id="attachment_766" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.smartlogicsolutions.com/wp-content/uploads/2009/11/Picture-33.png"><img src="http://blog.smartlogicsolutions.com/wp-content/uploads/2009/11/Picture-33-300x291.png" alt="Google Analytics | Top Landing Pages" title="Google Analytics | Top Landing Pages" width="300" height="291" class="size-medium wp-image-766" /></a><p class="wp-caption-text">Google Analytics | Top Landing Pages</p></div>
<p>Here is a subset of the associated Rack::Rewrite rules.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  config.<span style="color:#9900CC;">middleware</span>.<span style="color:#9900CC;">insert_before</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">Rack::Lock</span>, <span style="color:#6666ff; font-weight:bold;">Rack::Rewrite</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>        
    <span style="color:#008000; font-style:italic;"># original wiki smartlogicsolutions.com website</span>
    r301 <span style="color:#996600;">'/wiki/Main_Page'</span>, <span style="color:#996600;">'/'</span>
    r301 <span style="color:#996600;">'/wiki/John_Trupiano'</span>, <span style="color:#996600;">'/john'</span>
    r301 <span style="color:#006600; font-weight:bold;">%</span>r<span style="color:#006600; font-weight:bold;">&#123;</span>^<span style="color:#006600; font-weight:bold;">/</span>wiki<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>Charity<span style="color:#006600; font-weight:bold;">|</span>Charities<span style="color:#006600; font-weight:bold;">|</span>Local_Connection<span style="color:#006600; font-weight:bold;">&#41;</span>$<span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color:#996600;">'/gratis-work-and-charities'</span>
    r301 <span style="color:#996600;">'/wiki/Category:Portfolio'</span>, <span style="color:#996600;">'/portfolio'</span>
    r301 <span style="color:#996600;">'/wiki/ExxonMobil_-_Brand_Asset_Center'</span>, <span style="color:#996600;">'/portfolio/exxonmobil-brand-asset-center'</span>
    r301 <span style="color:#996600;">'/wiki/In_the_News'</span>, <span style="color:#996600;">'/in-the-news'</span>
    r301 <span style="color:#996600;">'/wiki/Getting_to_our_Office'</span>, <span style="color:#996600;">'/driving-directions'</span>
    r301 <span style="color:#996600;">'/wiki/Category:Employees'</span>, <span style="color:#996600;">'/our-team'</span>
    r301 <span style="color:#996600;">'/wiki/SimNet_for_Office_2007'</span>, <span style="color:#996600;">'/portfolio/simnet-for-office-2007-and-vista'</span>
    r301 <span style="color:#996600;">'/wiki/VNC_Collaboration_Application'</span>, <span style="color:#996600;">'/portfolio/shared-desktop'</span>
    r301 <span style="color:#996600;">'/wiki/Contact_Information'</span>, <span style="color:#996600;">'/contact-us'</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This scheme is great for landing pages, but what if we had querystring information that we wanted to keep around?  This is common for tracking codes &#8212; many marketing platforms generate URL&#8217;s that embed data in the querystring for recording and tracking purposes.  We can leverage the following trick to maintain the querystring across a rewrite.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  r301 <span style="color:#006600; font-weight:bold;">%</span>r<span style="color:#006600; font-weight:bold;">&#123;</span>^<span style="color:#006600; font-weight:bold;">/</span>wiki<span style="color:#006600; font-weight:bold;">/</span>Main_Page<span style="color:#006600; font-weight:bold;">&#40;</span>\?.<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006600; font-weight:bold;">&#41;</span>?$<span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color:#996600;">'/$1'</span></pre></div></div>

<p>Note the following:</p>
<ul>
<li>We are conditionally matching a querystring so that the rule continues to match in the absence of a querystring. </li>
<li>We are leveraging substitution patterns to reconstitute the querystring in the rewritten URL.
</ul>
<p>Many more great use cases for Rack::Rewrite are covered in the project&#8217;s <a href="http://github.com/jtrupiano/rack-rewrite">README</a>.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/" rel="bookmark" class="crp_title">Rack::Rewrite for Site Maintenance and Downtime</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/" rel="bookmark" class="crp_title">Directory Conventions for Rack Middleware RubyGems</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/09/24/google-analytics-event-tracking-overview/" rel="bookmark" class="crp_title">Google Analytics Event Tracking Overview</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rack::Rewrite for Site Maintenance and Downtime</title>
		<link>http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 15:36:26 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rack-rewrite]]></category>
		<category><![CDATA[rubygem]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=740</guid>
		<description><![CDATA[Rack::Rewrite is a Rack middleware for defining and applying rewrite rules. Though it&#8217;s not a full replacement for Apache&#8217;s mod_rewrite, a great deal of rules I&#8217;ve previously written in Apache config files can be replaced by Rack::Rewrite. Run gem install rack-rewrite to install the gem. I typically leverage rewrite rules to take my sites offline [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/jtrupiano/rack-rewrite">Rack::Rewrite</a> is a <a href="http://rack.rubyforge.org/">Rack</a> middleware for defining and applying rewrite rules.  Though it&#8217;s not a full replacement for <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">Apache&#8217;s mod_rewrite</a>, a great deal of rules I&#8217;ve previously written in Apache config files can be replaced by Rack::Rewrite.  Run <code>gem install rack-rewrite</code> to install the gem.</p>
<p>I typically leverage rewrite rules to take my sites offline for maintenance.  Most <a href="http://www.capify.org/index.php/Capistrano">capistrano</a> users will be familiar with the following Apache rewrite ruleset.<br />
<span id="more-740"></span></p>
<pre>
  RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L]
</pre>
<p>This ruleset matches requests for non-asset URL&#8217;s and renders a maintenance page if it exists on the filesystem.  When capistrano users run <code>cap deploy:web:disable REASON="site upgrade" UNTIL="2PM"</code> a maintenance page is placed in public/system and this ruleset begins to kick in.  Running <code>cap deploy:web:enable</code> will remove this page and the ruleset ceases to match.</p>
<p>We can replace this ruleset with the following Rack::Rewrite rule:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># Ruby 1.8.x</span>
  maintenance_file = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span>RAILS_ROOT, <span style="color:#996600;">'public'</span>, <span style="color:#996600;">'system'</span>, <span style="color:#996600;">'maintenance.html'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  send_file <span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#006600; font-weight:bold;">*/</span>, maintenance_file, :<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">Proc</span>.<span style="color:#9900CC;">new</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>rack_env<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>maintenance_file<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> rack_env<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'REQUEST_URI'</span><span style="color:#006600; font-weight:bold;">&#93;</span> !~ <span style="color:#006600; font-weight:bold;">/</span>\.<span style="color:#006600; font-weight:bold;">&#40;</span>css<span style="color:#006600; font-weight:bold;">|</span>jpg<span style="color:#006600; font-weight:bold;">|</span>png<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>This rewrite rule uses the <code>send_file</code> method to return the maintenance page, uses a rule guard (the :if proc) to check for the existence of the file, and accesses the rack environment directly (rack_env arg to the Proc) to check the request URI.  Due to the shortcomings of the Ruby 1.8&#8242;s regular expression library (no negative lookahead), we have to leverage the rule guard to allow assets to continue to be served (css, jpg, png).</p>
<p>Using Ruby 1.9, this rule is simpler.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># Ruby 1.9.x</span>
  maintenance_file = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span>RAILS_ROOT, <span style="color:#996600;">'public'</span>, <span style="color:#996600;">'system'</span>, <span style="color:#996600;">'maintenance.html'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  send_file <span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>.<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006600; font-weight:bold;">&#41;</span>$<span style="color:#006600; font-weight:bold;">&#40;</span>?<span style="color:#006600; font-weight:bold;">&lt;</span>!css<span style="color:#006600; font-weight:bold;">|</span>png<span style="color:#006600; font-weight:bold;">|</span>jpg<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span>, maintenance_file, :<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">Proc</span>.<span style="color:#9900CC;">new</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>rack_env<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>maintenance_file<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>Users of 1.8.x can leverage <a href="http://oniguruma.rubyforge.org/">Oniguruma</a> to keep the rule simpler.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># Ruby 1.8.x + Oniguruma</span>
  maintenance_file = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span>RAILS_ROOT, <span style="color:#996600;">'public'</span>, <span style="color:#996600;">'system'</span>, <span style="color:#996600;">'maintenance.html'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  send_file <span style="color:#6666ff; font-weight:bold;">Oniguruma::ORegexp</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(.*)$(?&lt;!css|png|jpg)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>, maintenance_file, :<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">Proc</span>.<span style="color:#9900CC;">new</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>rack_env<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>maintenance_file<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/11/24/rack-rewrite-google-analytics-makes-site-transitions-seamless/" rel="bookmark" class="crp_title">Rack::Rewrite + Google Analytics Makes Site Transitions Seamless</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/directory-conventions-for-rack-middleware-rubygems/" rel="bookmark" class="crp_title">Directory Conventions for Rack Middleware RubyGems</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/06/02/better-setup-for-environments-in-rails/" rel="bookmark" class="crp_title">Better setup for environments in Rails</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/11/16/rack-rewrite-for-site-maintenance-and-downtime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Timecop 0.3.0 Released</title>
		<link>http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 03:27:34 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[John Trupiano]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TATFT]]></category>
		<category><![CDATA[rubygem]]></category>
		<category><![CDATA[tatft]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[timecop]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=704</guid>
		<description><![CDATA[Timecop 0.3.0 has just been released. To install simply run: gem install timecop. Timecop is a RubyGem providing &#8220;time travel&#8221; and &#8220;time freezing&#8221; capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. Documentation is on RubyForge. The source code is [...]]]></description>
			<content:encoded><![CDATA[<p>Timecop 0.3.0 has just been released.  To install simply run: <code>gem install timecop</code>.</p>
<p>Timecop is a RubyGem providing &#8220;time travel&#8221; and &#8220;time freezing&#8221; capabilities, making it dead simple to test time-dependent code.  It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.</p>
<p>Documentation is on <a href="http://johntrupiano.rubyforge.org/timecop/">RubyForge</a>.  The source code is hosted at <a href="http://github.com/jtrupiano/timecop">GitHub</a>.</p>
<p>Updates include:</p>
<p><strong>API</strong></p>
<ul>
<li>Completely remove Timecop#unset_all (deprecated by Timecop#return in 0.2.0)</li>
<li>Return Time.now from #freeze, #travel and #return  &#8212; code contributed by Keith Bennett (<a href="http://github.com/keithrbennett">keithrbennett</a>)</li>
</ul>
<p><strong>Maintenance</strong></p>
<ul>
<li>Fix bug that left Time#mock_time set in some instances</li>
<li>Upped build dependency to jeweler ~> 1.2.1</li>
<li>Don&#8217;t pollute top-level namespace with classes/constants</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Clearer examples in the README, better description in the gemspec</li>
<li>Improve RDoc</li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2009/12/07/timecop-0-3-4-released/" rel="bookmark" class="crp_title">Timecop 0.3.4 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/" rel="bookmark" class="crp_title">Timecop 0.2.0 Released: Freeze and Rebase Time in Ruby</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/11/19/timecop-freeze-time-in-ruby-for-better-testing/" rel="bookmark" class="crp_title">Timecop: Freeze Time in Ruby for Better Testing</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/01/06/rack-rewrite-0-2-1-released/" rel="bookmark" class="crp_title">Rack::Rewrite 0.2.1 Released</a></li><li><a href="http://blog.smartlogicsolutions.com/2010/05/13/rack-rewrite-1-0-0-released/" rel="bookmark" class="crp_title">Rack::Rewrite 1.0.0 Released</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/09/20/timecop-0-3-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shell Script to Upgrade Ruby Enterprise Edition while Maintaining Directory Naming Sanity</title>
		<link>http://blog.smartlogicsolutions.com/2009/06/10/shell-script-to-upgrade-ruby-enterprise-edition-while-maintaining-directory-naming-sanity/</link>
		<comments>http://blog.smartlogicsolutions.com/2009/06/10/shell-script-to-upgrade-ruby-enterprise-edition-while-maintaining-directory-naming-sanity/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 01:24:28 +0000</pubDate>
		<dc:creator>John Trupiano</dc:creator>
				<category><![CDATA[Passenger]]></category>
		<category><![CDATA[Ruby Enterprise Edition]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[ree]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=685</guid>
		<description><![CDATA[As you&#8217;re likely already aware, a denial of service (DoS) vulnerability in Ruby&#8217;s BigDecimal library was uncovered, fixed and reported on June 9, 2009. Patching options include: Replacing your current ruby installation with a patched version Installing a gem to patch the code and then updating your application to load the patch. The latter approach [...]]]></description>
			<content:encoded><![CDATA[<p>As you&#8217;re likely already aware, a denial of service (DoS) vulnerability in Ruby&#8217;s BigDecimal library was <a href="http://blog.phusion.nl/2009/06/10/ruby-enterprise-edition-186-20090610-released-fixes-bigdecimal-dos-vulnerability/">uncovered, fixed and reported on June 9, 2009</a>.  Patching options include:</p>
<ul>
<li>Replacing your current ruby installation with a <a href="http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz">patched version</a></li>
<li><a href="http://github.com/NZKoz/bigdecimal-segfault-fix/tree/master">Installing a gem</a> to patch the code and then updating your application to load the patch.</li>
</ul>
<p><span id="more-685"></span></p>
<p>The latter approach only postpones the inevitable, so I opted for the former.  If you&#8217;re using the <a href="http://blog.phusion.nl/2009/06/10/ruby-enterprise-edition-186-20090610-released-fixes-bigdecimal-dos-vulnerability/">debian packages</a>, it&#8217;s a simple call to aptitude update.  However, if you&#8217;ve installed from source, this presents a few challenges.</p>
<p>The upgrade is actually quite straightforward.  According to the <a href="http://www.rubyenterpriseedition.com/documentation.html#_upgrading">REE Documentation</a>, you simply need to run the <a href="http://www.rubyenterpriseedition.com/ruby-enterprise-1.8.6-20090610.tar.gz">new installer</a> over top of your previous installation.  This includes specifying the exact same directory name that you used to install the previous version.</p>
<p>As you may know, REE installs by default into /opt/ruby-enterprise-1.8.6-&lt;year_month_day_release&gt;.  However, after completing this, you&#8217;re left with a directory name that doesn&#8217;t reflect what&#8217;s actually installed in there.  If you&#8217;ve a little neurotic like I am, you&#8217;re going to want to rename that directory.  However, be careful.  Your <a href="http://www.modrails.com/">Passenger</a> configuration is likely pointing to the directory that you want to rename, so you&#8217;ll have to remember to update your apache/nginx configuration to reflect this.</p>
<p>When we install REE we create a symlink at /opt/ruby which points to the version of ruby that we want passenger to run.  This allows us to quickly swap in/out different versions of ruby for testing/upgrading/etc.</p>
<p>Considering we have dozens of client applications running on distinct servers each with their own versions of REE installed, I decided to write a script to minimize the manual effort required to upgrade several production servers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># Author: John Trupiano</span>
<span style="color: #666666; font-style: italic;"># Script to upgrade an REE installation on a hot server and maintain sane directory names</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(whoami)</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;root&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You need to be root to run this!&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">RF_RELEASE</span>=<span style="color: #000000;">58677</span>
<span style="color: #007800;">REE_VERSION</span>=<span style="color: #000000;">20090610</span>
<span style="color: #007800;">REE</span>=ruby-enterprise-1.8.6-<span style="color: #007800;">$REE_VERSION</span>
<span style="color: #007800;">URL</span>=http:<span style="color: #000000; font-weight: bold;">//</span>rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$RF_RELEASE</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REE</span>.tar.gz
&nbsp;
<span style="color: #666666; font-style: italic;"># Determine what the most recent version of REE is that is installed</span>
<span style="color: #007800;">MOST_RECENT_REE_VERSION</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>opt <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span><span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">'$4 &gt; max &amp;&amp; $2 == &quot;enterprise&quot; { max=$4; maxline=$0 }; END { print max }'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">MOST_RECENT_REE</span>=ruby-enterprise-1.8.6-<span style="color: #007800;">$MOST_RECENT_REE_VERSION</span>
&nbsp;
<span style="color: #007800;">WORKING_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>src
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Going to update <span style="color: #007800;">$MOST_RECENT_REE</span> to <span style="color: #007800;">$REE</span>&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Back up previous release&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span>.bak
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Download new release&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$WORKING_DIR</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$WORKING_DIR</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #007800;">$URL</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Untar and install over the previous release for 'upgrade' according to REE manual&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzf <span style="color: #007800;">$REE</span>.tar.gz
.<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REE</span><span style="color: #000000; font-weight: bold;">/</span>installer <span style="color: #660033;">--auto</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Shuffle folder names to remain sane&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REE</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span>.bak <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MOST_RECENT_REE</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Actually symlink in the new version of REE&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REE</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Clean up after ourselves&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$WORKING_DIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REE</span></pre></div></div>

<p>Simply upload this script to your server, su &#8211; up to root and run it.  Then restart apache/nginx so that passenger will pick up the new version of ruby.  All of your gems will be maintained, and your most recent version of REE will remain in tact at /opt/ruby-enterprise-1.8.6-&lt;old_version&gt; in case you need it again.</p>
<p><a href="http://gist.github.com/127636">View the script on github</a></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.smartlogicsolutions.com/2009/04/26/integrity-ci-on-passenger-222-with-ruby-enterprise-edition-on-ubuntu-804/" rel="bookmark" class="crp_title">Integrity CI on Passenger 2.2.2 with Ruby Enterprise Edition on Ubuntu 8.04</a></li><li><a href="http://blog.smartlogicsolutions.com/2009/02/13/aasm-interning-empty-string-error/" rel="bookmark" class="crp_title">AASM + interning empty string error</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/07/07/i-cant-upgrade-rubygems-from-111-to-120-on-ubuntu/" rel="bookmark" class="crp_title">I can&#8217;t upgrade RubyGems from 1.1.1 to 1.2.0 on Ubuntu</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/10/15/using-swfobject-to-seamlessly-upgrade-to-flash-player-10/" rel="bookmark" class="crp_title">Using SWFObject to Seamlessly Upgrade to Flash Player 10</a></li><li><a href="http://blog.smartlogicsolutions.com/2008/08/04/introducing-environmentalize-an-intuitive-environment-focused-config-structure-for-your-rails-applications/" rel="bookmark" class="crp_title">Introducing environmentalist: an intuitive, environment-focused config structure for your rails applications</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.smartlogicsolutions.com/2009/06/10/shell-script-to-upgrade-ruby-enterprise-edition-while-maintaining-directory-naming-sanity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

