<?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>BoxCycle Blog &#187; Programming</title>
	<atom:link href="http://blog.boxcycle.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.boxcycle.com</link>
	<description>Make the World Better - Be Part of the Cycle!</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:00:57 +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>Months of Frustration or How BoxCycle Got a Speed Boost</title>
		<link>http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/</link>
		<comments>http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 17:46:53 +0000</pubDate>
		<dc:creator>BoxCycle</dc:creator>
				<category><![CDATA[Inside the Box]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site Updates]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://boxcycle.cheapcardboardboxes.biz/?p=362</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/' addthis:title='Months of Frustration or How BoxCycle Got a Speed Boost '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>The last few months have been pretty exciting for BoxCycle. We are seeing more visits, more listings, and more orders and we are refining the process to help us keep up and provide the best possible experience for buyers and sellers. Unfortunately, the last few months have also been maddening. Just as traffic improved, website [...]<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/' addthis:title='Months of Frustration or How BoxCycle Got a Speed Boost '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/' addthis:title='Months of Frustration or How BoxCycle Got a Speed Boost '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>The last few months have been pretty exciting for <a href="http://www.boxcycle.com">BoxCycle</a>.  We are seeing more visits, more listings, and more orders and we are refining the process to help us keep up and provide the best possible experience for buyers and sellers. </p>
<p>Unfortunately, the last few months have also been maddening.  Just as traffic improved, website performance became slow and unreliable.  We tried a number of things to improve speed, but, ultimately, the problem came down to deteriorating performance of our web host, <a rel="nofollow" href="http://www.hostingrails.com">HostingRails</a>.  HostingRails has worked quite well when we setup BoxCycle, but, since being taken over by JumpLine in 2010, seems to have lost their Rails expertise and their performance focus.  As time passed, the site performed poorer and poorer and JumpLine&#8217;s response gave little hope that it would get better.</p>
<p>Switching providers is always scary, but in mid-May we pulled the plug and moved over to <a href="http://www.webfaction.com">WebFaction</a> which is known for its modern setup, less loaded servers, and a focus on performance.  The transition was nerve-racking, but went through without a hitch.  </p>
<p>We also implemented a number of improvements, both before and after the transition, to help with performance:</p>
<ul>
<li>Switched from Apache/Mongrel to Nginx/Passenger</li>
<li>Implemented many server-side best practices such as GZip</li>
<li>Added Expires headers to static assets and made sure that they are served by Nginx without touching Rails</li>
<li>Implemented Rails fragment caching on some heavily used components</li>
<li><a href="http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/">Modified deployment</a> so last modified dates are only updated on changed files</li>
<li>Upgraded to the latest version of the <a href="http://www.twilio.com/">Twilio</a> API allowing us to setup Failover for outgoing calls to better deal with server timeouts</li>
<li>Started using asset_host in Rails to split requests for static files between several domains</li>
<li>Updated BoxCycle to heed more of the recommendations made by tools like <a href="http://developer.yahoo.com/yslow/">YSlow</a> and <a href="http://code.google.com/speed/page-speed/">Google PageSpeed</a></li>
<li>Upgraded Rails to 2.3.11 (made possible by switching to Passenger since Mongrel has problems above 2.3.5 and we don&#8217;t yet have a good reason to migrate to Rails 3)</li>
</ul>
<p>There are certainly more things we can do, but fundamentally, we aren&#8217;t yet at a point where optimizing performance should be our highest priority.  There is plenty of work on our plate that more directly impacts people&#8217;s ability to buy and sell used boxes.</p>
<p>Unfortunately, we ended up on a WebFaction server that was under quite a bit of load and despite all the work we were stuck with a less intense version of the same problem.  Talk about frustrating.  To their credit, WebFaction was prompt with action and communication and worked with us to identify and remove issues causing load.  After a few weeks of effort, things improved, but were still not acceptable.  We requested to be transferred to another server.  Again, to their credit, WebFaction was very accommodating and setup our account on a server with lowest average load.</p>
<p>So once again, we rolled up our sleeves and transferred servers.  Transferring within the same host is easier, and, since WebFaction supports multi-server setups, it is easier still.  But it was still nerve-racking. </p>
<p>The transition is now over and the difference is spectacular.  BoxCycle feels super fast.  I, for one, am just relieved to have this issue over with.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/' addthis:title='Months of Frustration or How BoxCycle Got a Speed Boost '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.boxcycle.com/2011/06/months-of-frustration-or-how-boxcycle-got-a-speed-boost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep Last Modified Dates with Capistrano Deploy and SVN/Git</title>
		<link>http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/</link>
		<comments>http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/#comments</comments>
		<pubDate>Tue, 24 May 2011 00:05:36 +0000</pubDate>
		<dc:creator>BoxCycle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://boxcycle.cheapcardboardboxes.biz/?p=369</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/' addthis:title='Keep Last Modified Dates with Capistrano Deploy and SVN/Git '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>BoxCycle is a Rails application that just switched to Git from SVN for version control and uses Capistrano to help automate deployment. Problem: Deploy Updates Last Modified Dates on All Files As shocking as it may seem, when you deploy a new version of your app, there is a good chance that Last Modified dates [...]<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/' addthis:title='Keep Last Modified Dates with Capistrano Deploy and SVN/Git '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/' addthis:title='Keep Last Modified Dates with Capistrano Deploy and SVN/Git '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>BoxCycle is a Rails application that just switched to Git from SVN for version control and uses Capistrano to help automate deployment.</p>
<h2>Problem: Deploy Updates Last Modified Dates on All Files</h2>
<p>As shocking as it may seem, when you deploy a new version of your app, there is a good chance that Last Modified dates of <b>all</b> files will be updated to the date of deployment even though most of those files did not change.</p>
<h2>Why Are Last Modified Dates Important?</h2>
<p>In a word, <strong>caching</strong>.</p>
<p>Last Modified dates are used for Last-Modified and Etag headers which are used by the server to tell the browser if it can use the file already stored in the cache or needs to download the file again.  They are also used by Rails for generating cache-busters &#8211; the query parameter it adds to images, javascript, and css.  Cache-busters allow you to set Expires headers far in the future for files that don&#8217;t change often without worrying that you won&#8217;t be able to to update them should they change.</p>
<p>Expires headers are crucial since they allow the browser to use files in the cache without even asking the server if the files are still current (like it does with Last-Modified or ETag headers).  Their importance is clear with Rails enabling cache-busters by default even though Expires headers require server configuration and won&#8217;t be enabled by many users.  Rails cache-busters carry a decent performance hit since they must access the file system to get the modified date, but are still enabled by default since making setting Expires headers easier is deemed worth it.</p>
<p>But many default deployment processes will result in Last Modified dates being updated for unchanged files which means that users&#8217; browser have to reload all static assets after every deploy significantly reducing the benefit of Expires headers as well as Last-Modified and Etag headers</p>
<h2>Cause: Commands like cp, checkout, and clone Modify Dates</h2>
<p>Odds are that your deployment process copies files or uses <code>git clone</code> or <code>svn checkout</code>.  If it does, modified dates of all files will be updated.</p>
<p><code>cp</code> offers options to retain modified dates.  From everything I could find, SVN does not store modified dates in the repository and so there is no simple way of maintaining dates after you commit.  Git seems to retain modified dates and this was the reason we switched to it, hoping this would solve this problem.  While it may retain the dates, it did not solve the problem, since git clone sets new file dates.  There may be a way to configure git clone to not overwrite the modified dates, but I didn&#8217;t find it before finding another solution.</p>
<h2>Solution: Use :deploy_via, :remote_cache and set :normalize_asset_timestamps, false</h2>
<p>In Capistrano we originally used <code>:deploy_via, :checkout</code>.  With <code>:remote_cache</code>, Capistrano loads the latest version into a shared/cached-copy directory and fetches only the updates which allows the dates of unmodified files to remain on subsequent deploys.  <code>:remote_cache</code> definitely works with Git and will probably work with SVN.</p>
<p>You may still have a problem since Capistrano may set all the dates for you.  To make sure this doesn&#8217;t happen <code>set :normalize_asset_timestamps, false</code> in your deploy file.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/' addthis:title='Keep Last Modified Dates with Capistrano Deploy and SVN/Git '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.boxcycle.com/2011/05/keep-last-modified-dates-with-capistrano-deploy-and-svn-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Zone Support and A+ Sellers</title>
		<link>http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/</link>
		<comments>http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 19:54:44 +0000</pubDate>
		<dc:creator>BoxCycle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site Updates]]></category>

		<guid isPermaLink="false">http://blog.boxcycle.com/?p=227</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/' addthis:title='Time Zone Support and A+ Sellers '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>Since the last post, most of the updates to BoxCycle have been small usability improvements and internal process improvements.  The most interesting customer facing feature we&#8217;ve added is A+ Sellers.  I have a well-developed idea of a rating system BoxCycle will use in the future to relay seller performance to buyers, giving them additional information [...]<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/' addthis:title='Time Zone Support and A+ Sellers '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/' addthis:title='Time Zone Support and A+ Sellers '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Since the last post, most of the updates to BoxCycle have been small usability improvements and internal process improvements.  The most interesting customer facing feature we&#8217;ve added is <strong>A+ Sellers</strong>.  I have a well-developed idea of a rating system BoxCycle will use in the future to relay seller performance to buyers, giving them additional information relevant during order placement.  However, I realized that this system, although important, is probably not the highest priority.</p>
<p>At this time, we can achieve much of the benefit by simply adding a designation for our best sellers &#8211; this is exactly what A+ accomplishes.  It highlights sellers who&#8217;ve processed many orders reliably, confirmed appointments quickly, and otherwise dealt with customers in an exemplary manner.  The designation should go a long way in telling customers concerned with uncertainty who their best bet is and, as a result, rewarding high seller performance.</p>
<p><strong>Time Zone Support</strong></p>
<p>I am very excited about the update released today.  BoxCycle now has full time zone support.  To end users used to dealing with a single time zone this may seem like a non-event.  Programmers who&#8217;ve never dealt with time zones may think it&#8217;s trivial.  But time zones are more difficult to deal with than it first appears and have a been a constant barrier, requiring ugly workarounds that never fully solve the problem.</p>
<p>The scary part about this change is that it&#8217;s so all-encompassing.  Although visually you&#8217;ll see only minor changes, nearly every section of our site might be impacted and every date in our database had to be updated.  I don&#8217;t doubt we&#8217;ll run into issues, but this was a required step in the site&#8217;s development and I am very happy to have the bulk of the work behind us.  A number of annoying, odd behaviors regarding time were immediately eliminated and several exciting features on the roadmap are now a big step closer to reality.  Woohoo!</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/' addthis:title='Time Zone Support and A+ Sellers '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.boxcycle.com/2010/04/time-zone-support-and-a-sellers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permission Denied During Rails Freeze Gems</title>
		<link>http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/</link>
		<comments>http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 06:29:23 +0000</pubDate>
		<dc:creator>BoxCycle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[freeze gems]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.boxcycle.com/?p=144</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/' addthis:title='Permission Denied During Rails Freeze Gems '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>Hopefully, this will save some Rails programmers a bit of searching. Permission denied &#8211; activesupport-2.3.2 or activesupport error when trying to run rake rails:freeze:gems?  For solution refer to http://www.ruby-forum.com/topic/184589 .  In a nutshell, you need to edit line 28 of rubylibrubygems1.8gemsrails-2.3.2libtasksframework.rake to include sleep(5) between the Gem::GemRunner line and the mv line.<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/' addthis:title='Permission Denied During Rails Freeze Gems '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/' addthis:title='Permission Denied During Rails Freeze Gems '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Hopefully, this will save some Rails programmers a bit of searching.</p>
<p>Permission denied &#8211; activesupport-2.3.2 or activesupport error when trying to run rake rails:freeze:gems?  For solution refer to <a href="http://www.ruby-forum.com/topic/184589">http://www.ruby-forum.com/topic/184589</a> . </p>
<p>In a nutshell, you need to edit line 28 of rubylibrubygems1.8gemsrails-2.3.2libtasksframework.rake to include sleep(5) between the Gem::GemRunner line and the mv line.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/' addthis:title='Permission Denied During Rails Freeze Gems '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.boxcycle.com/2009/07/permission-denied-rails-freeze-gems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Plugin Updates, SVN, and Piston 2.0.2 on Windows</title>
		<link>http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/</link>
		<comments>http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/#comments</comments>
		<pubDate>Sun, 10 May 2009 03:37:06 +0000</pubDate>
		<dc:creator>BoxCycle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[piston]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.boxcycle.com/?p=89</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/' addthis:title='Rails Plugin Updates, SVN, and Piston 2.0.2 on Windows '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>I haven&#8217;t done a programming related blog entry until this one.  Why?  First, I want to keep this blog focused on BoxCycle and environmental issues.  Second, I haven&#8217;t had much time, as is evident from lack of posts on environmental issues.  Finally, I haven&#8217;t run into much that I couldn&#8217;t find an answer to with a few searches and [...]<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/' addthis:title='Rails Plugin Updates, SVN, and Piston 2.0.2 on Windows '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/' addthis:title='Rails Plugin Updates, SVN, and Piston 2.0.2 on Windows '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>I haven&#8217;t done a programming related blog entry until this one.  Why?  First, I want to keep this blog focused on <a href="http://www.boxcycle.com">BoxCycle </a>and environmental issues.  Second, I haven&#8217;t had much time, as is evident from lack of posts on environmental issues.  Finally, I haven&#8217;t run into much that I couldn&#8217;t find an answer to with a few searches and I am not fond of duplicating effort just to get a post up.  This time I think I have something to contribute to the Ruby on Rails community.</p>
<p>The issue is updating plugins.  Initially, I simply did &#8216;plugin install&#8217; and checked them into my svn repository not thinking much of it.  My guess is, this is what most beginners to Subversion do.  In passing I saw things about svn:externals, but figured it was advanced stuff and I&#8217;d sort it out later.</p>
<p>When it came time to update some of the plugins I did &#8216;plugin install&#8217; again, and didn&#8217;t think much of it, again.  That is, until I went to checkin the project.  Subversion refused.  It took me a while to figure out what&#8217;s going on and a lot of trial and error to be able to check in the project at all.  I now know exactly how to do it:</p>
<ol>
<li>Delete the directory containing the plugin</li>
<li>Checkin changes</li>
<li>Install the new plugin</li>
<li>Checkin changes</li>
</ol>
<p>Quite annoying.  Even worse if you made changes to the plugin code.  Why is this necessary?</p>
<p>Subversion keeps state in hidden .svn directories in your local copy.  It can&#8217;t checkin directories that are missing .svn folders because it can&#8217;t figure out their state.  &#8216;plugin install&#8217; removes the directory tree when it reinstalls the plugin.  The only thing you can do is first checkin a version without the directory and then add the directory back in the next commit.  Some good links on the topic: <a href="http://railsforum.com/viewtopic.php?id=24882">http://railsforum.com/viewtopic.php?id=24882</a> and <a href="http://stackoverflow.com/questions/119006/what-should-i-do-with-the-vendor-directory-with-respect-to-subversion">http://stackoverflow.com/questions/119006/what-should-i-do-with-the-vendor-directory-with-respect-to-subversion</a> .</p>
<p>Once I figured out the issue, I understood svn:externals and found tools like Piston to make management easier.  However, by then, most of the Rails community has moved to Git version control which doesn&#8217;t work well with svn:externals or Piston.  Piston has been promising to make a Git compatible version, but for much of BoxCycle&#8217;s existence it hasn&#8217;t occurred.  Plugin updates have been a huge thorn in my side.</p>
<p>With large changes to <a href="http://guides.rubyonrails.org/2_3_release_notes.html">Rails 2.3.2</a>, most plugins needed to be updated.  I was very excited to see that <a href="http://piston.rubyforge.org/index.html">Piston 2.0.2</a> has finally been released and &#8216;gem install piston&#8217; actually installed the right version, which has not been the case for me with 1.9.x releases.  However, I did run into installation issues on Windows which took me a while to resolve.  Sharing the solution is my primary motivation for this post.</p>
<p>So keep the following in mind when you install Piston 2.0.2 on a Windows XP machine (I presume Vista is similar):</p>
<ul>
<li>After &#8216;gem install piston&#8217; type in the &#8216;piston&#8217; command.  If you get errors, read them carefully.  Dependencies don&#8217;t seem to be well defined for the Piston gem and I had to install a number of gems separately before the &#8216;piston&#8217; command displayed the usage help screen.</li>
<li>You need to have Git installed for Piston to work with Git repositories.  I installed  <a href="http://code.google.com/p/msysgit/">MSysGit</a> . </li>
<li>With Windows you are likely using <a href="http://instantrails.rubyforge.org/wiki/wiki.pl">InstantRails </a>which runs in it&#8217;s own isolated environment.  This means that Piston will not be aware that MSysGit is installed.  You need to update the InstantRails PATH to include Git.  Edit c:InstantRailsuse_ruby.cmd to have the PATH line include c:Program FilesGitcmd (or whatever your path to Git is).   Also update the use_ruby.cmd template in conf_files directory.</li>
</ul>
<p>Once I got Piston working I deleted existing plugins, hopefully for the last time, and did a checkin.  Then I used &#8216;piston import&#8217; to install new versions under Piston&#8217;s management.  I am quite relieved to not have to dread updating plugins again!</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/' addthis:title='Rails Plugin Updates, SVN, and Piston 2.0.2 on Windows '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.boxcycle.com/2009/05/plugin-updates-svn-piston-windows-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.boxcycle.com/category/programming/feed/ ) in 0.21353 seconds, on Feb 5th, 2012 at 2:12 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 2:12 pm UTC -->
