<?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>hotgazpacho</title>
	<atom:link href="http://hotgazpacho.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://hotgazpacho.org</link>
	<description>Embrace! Embrace! You hippie coder! Get off my dynamic lawn!</description>
	<lastBuildDate>Sat, 10 Jul 2010 15:22:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IronRuby MVP Shay Friedman on the next Iron Languages Podcast</title>
		<link>http://hotgazpacho.org/2010/07/ironruby-mvp-shay-friedman-on-the-next-iron-languages-podcast/</link>
		<comments>http://hotgazpacho.org/2010/07/ironruby-mvp-shay-friedman-on-the-next-iron-languages-podcast/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 15:17:43 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ironlanguages]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[podcast]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/?p=126</guid>
		<description><![CDATA[Shay Friedman, Microsoft IronRuby MVP, joins Mike and I for episode 2 of the Iron Languages Podcast. We&#8217;re recording on the afternoon of July 11th. If you have any questions you&#8217;d like us to ask Shay, leave a comment here or on the Iron Languages Podcast site: http://ironlanguages.net/next-show-dlr-ironruby-and-ironshay]]></description>
			<content:encoded><![CDATA[<p>Shay Friedman, Microsoft IronRuby MVP, joins Mike and I for episode 2 of the Iron Languages Podcast. We&#8217;re recording on the afternoon of July 11th. If you have any questions you&#8217;d like us to ask Shay, leave a comment here or on the Iron Languages Podcast site: http://ironlanguages.net/next-show-dlr-ironruby-and-ironshay</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/07/ironruby-mvp-shay-friedman-on-the-next-iron-languages-podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iron Languages Podcast &#8211; Episode I: We Have Lift-off</title>
		<link>http://hotgazpacho.org/2010/06/iron-languages-podcast-episode-i-we-have-lift-off/</link>
		<comments>http://hotgazpacho.org/2010/06/iron-languages-podcast-episode-i-we-have-lift-off/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 16:33:32 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ironlanguages]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/?p=120</guid>
		<description><![CDATA[Mike Hall and I have finally gotten together and recorded our first episode of The Iron Languages Podcast. In this episode, we chat about the Dynamic Language Runtime (DLR) and IronRuby in particular. Some links related to topics we discussed: Iron Ruby : http://ironruby.net Dynamic Language Runtime (DLR):http://en.wikipedia.org/wiki/Dynamic_Language_Runtime Factory Girl: http://github.com/thoughtbot/factory_girl Sinatra: http://sinatrarb.com Jython: http://www.jython.org RailsMentor.org: http://railsmentor.org Please let us [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ww.ironlanguages.net/"><img class="alignleft" title="The Iron Languages Podcast" src="http://hotgazpacho.org/wp-content/uploads/2010/07/Fe.png" alt="" width="150" height="150" /></a></p>
<p><a href="http://www.just3ws.com">Mike Hall</a> and I have finally gotten together and recorded our<a href="http://ironlanguages.posterous.com/episode-i-we-have-lift-off"> first episode of The Iron Languages Podcast</a>.</p>
<p>In this episode, we chat about the Dynamic Language Runtime (DLR) and IronRuby in particular.</p>
<p>Some links related to topics we discussed:</p>
<ul>
<li>Iron Ruby : <a href="http://ironruby.net/" target="_blank">http://ironruby.net</a></li>
<li>Dynamic Language Runtime (DLR):<a href="http://en.wikipedia.org/wiki/Dynamic_Language_Runtime" target="_blank">http://en.wikipedia.org/wiki/Dynamic_Language_Runtime</a></li>
<li>Factory Girl: <a href="http://github.com/thoughtbot/factory_girl" target="_blank">http://github.com/thoughtbot/factory_girl</a></li>
<li>Sinatra: <a href="http://sinatrarb.com/" target="_blank">http://sinatrarb.com</a></li>
<li>Jython: <a href="http://www.jython.org/" target="_blank">http://www.jython.org</a></li>
<li>RailsMentor.org: <a href="http://railsmentor.org/" target="_blank">http://railsmentor.org</a></li>
</ul>
<p>Please let us know what you think, how we can improve and what you&#8217;d like to hear about. We hope you enjoy the podcast!</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/06/iron-languages-podcast-episode-i-we-have-lift-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Factory Girl from C# with IronRuby for building .NET objects</title>
		<link>http://hotgazpacho.org/2010/06/using-factory-girl-from-c-with-ironruby-for-building-net-objects/</link>
		<comments>http://hotgazpacho.org/2010/06/using-factory-girl-from-c-with-ironruby-for-building-net-objects/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 12:30:00 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[factory girl]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/2010/06/using-factory-girl-from-c-with-ironruby-for-building-net-objects/</guid>
		<description><![CDATA[Recently at work, I’ve been using TDD to drive out the design for some WPF View Models. Part of what I’m doing is filtering a collection based on various properties of the elements in the collection. Of course, I’ve needed to build up that collection first. I’d come up with a very limited method using [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at work, I’ve been using TDD to drive out the design for some WPF View Models. Part of what I’m doing is filtering a collection based on various properties of the elements in the collection. Of course, I’ve needed to build up that collection first. I’d come up with a very limited method using <a href="http://msdn.microsoft.com/en-us/library/018hxwa8.aspx" target="_blank">Action&lt;T&gt;</a> to set properties when the builder method was called. While this worked for my needs, I got to thinking about a library I’ve used a couple of times on Rails projects: <a href="http://github.com/thoughtbot/factory_girl" target="_blank">Factory Girl</a>. </p>
<p>On numerous occasions working with C# on .NET, I’ve thought to myself “man, I really wish I had something like Factory Girl here!”. So, last night/this morning, I set out to create a <a href="http://www.extremeprogramming.org/rules/spike.html" target="_blank">spike solution</a> to determine the feasibility of hosting IronRuby within my C# library, thus allowing me to use Factory Girl to build POCOs for me. The result:</p>
<p> <script src="http://gist.github.com/431058.js?file=gistfile1.cs"></script>
<p>OH YEAH! </p>
<p>Well, at least for the Factory.build method, but that’s all I was interested in for this spike.</p>
<p>I’ve put my code up on <a href="http://github.com/hotgazpacho/IronRubyFactoryGirlSpike" target="_blank">github</a> for your perusal. For this particular solution I don’t think you’ll need Visual Studio 2010, but you will certainly need .NET 4 installed, as well as IronRuby. Also note that IronRuby needs to be installed into C:\IronRuby unless you want to edit the app.config and fix up some references.</p>
<p>I’m excited now about the possibilities of utilizing other Ruby libraries in my .NET projects!</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/06/using-factory-girl-from-c-with-ironruby-for-building-net-objects/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I&#8217;m on Herding Code!</title>
		<link>http://hotgazpacho.org/2010/06/im-on-herding-code/</link>
		<comments>http://hotgazpacho.org/2010/06/im-on-herding-code/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 18:16:25 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/?p=114</guid>
		<description><![CDATA[Just a quicky here&#8230; A couple of weeks ago, Cory Foy and I had a chat with the Herding Code guys. We talked about the differences between developing on the .NET platform and in Ruby/Rails. It was a great time. Please go give it a listen, and do let me know what you think!]]></description>
			<content:encoded><![CDATA[<p>Just a quicky here&#8230;</p>
<p>A couple of weeks ago, <a href="http://blog.coryfoy.com/">Cory Foy</a> and I <a href="http://herdingcode.com/?p=254">had a chat with the Herding Code</a> guys. We talked about the differences between developing on the .NET platform and in Ruby/Rails. It was a great time. Please go give it a listen, and do let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/06/im-on-herding-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presentation: IronRuby for the Rubyist</title>
		<link>http://hotgazpacho.org/2010/05/presentation-ironruby-for-the-rubyist/</link>
		<comments>http://hotgazpacho.org/2010/05/presentation-ironruby-for-the-rubyist/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:56:39 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/2010/05/presentation-ironruby-for-the-rubyist/</guid>
		<description><![CDATA[Last night, I gave a talk at the Tampa Ruby Brigade about IronRuby, targeted at the developer who already knows and loves Ruby. About 10 people turned out, including the regional Microsoft Developer Evangelist, Joe Healy&#160;(nice to see Microsoft reaching out to other development communities!). The crowd was predominantly Mac users, and I had some [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, <a href="http://www.meetup.com/tampa-rb/calendar/13481809/" target="_blank">I gave a talk at the Tampa Ruby Brigade</a> about IronRuby, targeted at the developer who already knows and loves Ruby. About 10 people turned out, including the regional Microsoft Developer Evangelist, <a href="http://www.devfish.net/" target="_blank">Joe Healy</a>&#160;<em>(nice to see Microsoft reaching out to other development communities!)</em>. The crowd was predominantly Mac users, and I had some concerns that the talk might not be well received. Boy, was I worried over nothing! This quote about sums up the reaction:</p>
<blockquote cite="http://www.meetup.com/tampa-rb/calendar/13481809/"><p>I was interested in IronRuby when it was first announced but had lost hope that it would ever be viable. Will did an awesome job of convincing me that it&#8217;s alive and well. Great talk.</p>
<p>&#8211; Barry Ezell</p>
</blockquote>
<p>Nice! Below are the slides, and <a href="http://github.com/hotgazpacho/ironruby-for-rubyists" target="_blank">here are the (admittedly thin) demos up on Github.</a></p>
<div style="width: 425px" id="__ss_4343064"><strong style="margin: 12px 0px 4px; display: block"><a title="IronRuby for the Rubyist" href="http://www.slideshare.net/hotgazpacho/iron-ruby-for-the-rubyist">IronRuby for the Rubyist</a></strong><object id="__sse4343064" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ironrubyfortherubyist-100528083539-phpapp01&amp;rel=0&amp;stripped_title=iron-ruby-for-the-rubyist" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed name="__sse4343064" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ironrubyfortherubyist-100528083539-phpapp01&amp;rel=0&amp;stripped_title=iron-ruby-for-the-rubyist" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/hotgazpacho">Will Green</a>.</div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/05/presentation-ironruby-for-the-rubyist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IronRuby: `gem update &#8211;system`</title>
		<link>http://hotgazpacho.org/2010/05/ironruby-gem-update-system/</link>
		<comments>http://hotgazpacho.org/2010/05/ironruby-gem-update-system/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:28:19 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[gems]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/?p=106</guid>
		<description><![CDATA[After reading this article on getting around the invalid exec_format “ir”, no %s issue when trying to update RubyGems in IronRuby, I came up with a better solution (rather than essentially swallowing the exception) to the problem. Stick the following file in: %IronRubyInstallDir%\lib\ruby\site_ruby\1.8\rubygems\defaults\ironruby.rb 123456789101112module Gem &#160; def self.default_exec_format &#160; &#160; exec_format = ConfigMap&#91;:ruby_install_name&#93;.sub&#40;'ir', '%s'&#41; rescue [...]]]></description>
			<content:encoded><![CDATA[<p>After reading <a href="http://marcinobel.com/index.php/bug-invalid-exec_format-ir" target="_blank">this article</a> on getting around the <strong><em>invalid exec_format “ir”, no %s</em></strong> issue when trying to update RubyGems in IronRuby, I came up with a better solution (rather than essentially swallowing the exception) to the problem. Stick the following file in:<tt> %IronRubyInstallDir%\lib\ruby\site_ruby\1.8\rubygems\defaults\ironruby.rb</tt></p>
<div class="codecolorer-container ruby vibrant" style="border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">module</span> Gem<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">default_exec_format</span><br />
&nbsp; &nbsp; exec_format = ConfigMap<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:ruby_install_name</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#CC0066; font-weight:bold;">sub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'ir'</span>, <span style="color:#996600;">'%s'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#996600;">'%s'</span><br />
<br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">unless</span> exec_format =~ <span style="color:#006600; font-weight:bold;">/%</span>s<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">then</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">raise</span> Gem::<span style="color:#CC00FF; font-weight:bold;">Exception</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#996600;">&quot;[BUG] invalid exec_format #{exec_format.inspect}, no %s&quot;</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
&nbsp; &nbsp; exec_format<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>I&#8217;m working on getting this contributed to the IronRuby project, as judging from the RubyGems sources, as well as the RubyGems sources distributed with JRuby, this is intended to be distributed by the Ruby implementation, not RubyGems itself.</p>
<p>Also note, this allows one to:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ir -S gem install bundler</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/05/ironruby-gem-update-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Patch to Ruby Gems for IronRuby support is in 1.3.7!</title>
		<link>http://hotgazpacho.org/2010/05/my-patch-to-ruby-gems-for-ironruby-support-is-in-1-3-7/</link>
		<comments>http://hotgazpacho.org/2010/05/my-patch-to-ruby-gems-for-ironruby-support-is-in-1-3-7/#comments</comments>
		<pubDate>Sat, 15 May 2010 04:24:34 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[gems]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/?p=101</guid>
		<description><![CDATA[I&#8217;m now a published contributor to a major open source project! C:\Users\Will&#62;gem up &#8211;system Updating RubyGems Updating rubygems-update Successfully installed rubygems-update-1.3.7 Updating RubyGems to 1.3.7 Installing RubyGems 1.3.7 RubyGems 1.3.7 installed ∩╗┐=== 1.3.7 / 2010-05-13 NOTE: http://rubygems.org is now the default source for downloading gems. You may have sources set via ~/.gemrc, so you should [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now a published contributor to a major open source project!</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">C:\Users\Will&gt;gem up &#8211;system</span></p>
<pre>Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.3.7
Updating RubyGems to 1.3.7
Installing RubyGems 1.3.7
RubyGems 1.3.7 installed</pre>
<pre>∩╗┐=== 1.3.7 / 2010-05-13</pre>
<pre>NOTE:</pre>
<pre>http://rubygems.org is now the default source for downloading gems.</pre>
<pre>You may have sources set via ~/.gemrc, so you should replace
http://gems.rubyforge.org with http://rubygems.org</pre>
<pre>http://gems.rubyforge.org will continue to work for the forseeable future.</pre>
<pre>New features:</pre>
<pre>* `gem` commands
  * `gem install` and `gem fetch` now report alternate platforms when a
    matching one couldn't be found.
  * `gem contents` --prefix is now the default as specified in --help.  Bug
    #27211 by Mamoru Tasaka.
  * `gem fetch` can fetch of old versions again.  Bug #27960 by Eric Hankins.
  * `gem query` and friends output now lists platforms.  Bug #27856 by Greg
    Hazel.
  * `gem server` now allows specification of multiple gem dirs for
    documentation.  Bug #27573 by Yuki Sonoda.
  * `gem unpack` can unpack gems again.  Bug #27872 by Timothy Jones.
  * `gem unpack` now unpacks remote gems.
  * --user-install is no longer the default.  If you really liked it, see
    Gem::ConfigFile to learn how to set it by default.  (This change was made
    in 1.3.6)</pre>
<pre><strong>* RubyGems now has platform support for IronRuby.  Patch #27951 by Will Green.</strong></pre>
<pre>Bug fixes:</pre>
<pre>* Require rubygems/custom_require if --disable-gem was set.  Bug #27700 by
  Roger Pack.
* RubyGems now protects against exceptions being raised by plugins.
* rubygems/builder now requires user_interaction.  Ruby Bug #1040 by Phillip
  Toland.
* Gem::Dependency support #version_requirements= with a warning.  Fix for old
  Rails versions.  Bug #27868 by Wei Jen Lu.
* Gem::PackageTask depends on the package dir like the other rake package
  tasks so dependencies can be hooked up correctly.</pre>
<pre>------------------------------------------------------------------------------</pre>
<pre>RubyGems installed the following executables:</pre>
<pre>C:/Ruby/bin/gem</pre>
<pre>C:\Users\Will&gt;</pre>
<p>Sure, it&#8217;s a small contribution (having Ruby Gems recognize IronRuby as a platform), but an important one none the less. This allows us to create gems specifically for the .NET platform, similar to the way JRuby has JVM-specific gems.</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/05/my-patch-to-ruby-gems-for-ironruby-support-is-in-1-3-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Release: iron-term-ansicolor 0.0.2 for IronRuby</title>
		<link>http://hotgazpacho.org/2010/02/new-release-iron-term-ansicolor-0-0-2-for-ironruby/</link>
		<comments>http://hotgazpacho.org/2010/02/new-release-iron-term-ansicolor-0-0-2-for-ironruby/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 03:02:51 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[RSpec]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/2010/02/new-release-iron-term-ansicolor-0-0-2-for-ironruby/</guid>
		<description><![CDATA[Tonight, I released version 0.0.2 of iron-term-ansicolor. As you may recall, iron-term-ansicolor makes use of the term-ansicolor library and the .Net base class library to provide colored console output for IronRuby. Users of RSpec and Cucumber on IronRuby should now have much cleaner colored output, thanks to Danny Coates, who found a better way to [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight, I released <a href="http://rubygems.org/gems/iron-term-ansicolor/versions/0.0.2">version 0.0.2 of iron-term-ansicolor</a>. As you may recall, iron-term-ansicolor makes use of the term-ansicolor library and the .Net base class library to provide colored console output for <a href="http://ironruby.net">IronRuby</a>. Users of <a href="http://rspec.info">RSpec</a> and <a href="http://cukes.info">Cucumber</a> on IronRuby should now have much cleaner colored output, thanks to <a href="http://github.com/dannycoates">Danny Coates</a>, who found a better way to parse the ANSI control codes out so that the appropriate calls to Console.ForegroundColor and Console.BackgroundColor.</p>
<p>Installation is a simple</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">igem install iron-term-ansicolor</div></td></tr></tbody></table></div>
<p>Cucumber has made use of iron-term-ansicolor on IronRuby since the first release of this library. I’m not sure what it would take to include automatic support for RSpec, but I’m sure it would probably be as simple as it was to add it to Cucumber.</p>
<p>The source is <a href="http://github.com/hotgazpacho/iron-term-ansicolor">available on github</a>. Please report any issues using the issue tracker there.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/02/new-release-iron-term-ansicolor-0-0-2-for-ironruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Ubuntu 9.10 for Ruby and Rails Development in VirtualBox on Windows</title>
		<link>http://hotgazpacho.org/2010/01/setting-up-ubuntu-9-10-for-ruby-and-rails-development-in-virtualbox-on-windows/</link>
		<comments>http://hotgazpacho.org/2010/01/setting-up-ubuntu-9-10-for-ruby-and-rails-development-in-virtualbox-on-windows/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 03:37:56 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby rails development vm linux]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/2010/01/setting-up-ubuntu-9-10-for-ruby-and-rails-development-in-virtualbox-on-windows/</guid>
		<description><![CDATA[I now believe that if you&#8217;re serious about creating Rails apps, you aren&#8217;t doing it on Windows. Or, you are a masochist. That’s a quote from me. I’m done trying to do serious Ruby &#38; Rails development on Windows. As of January 1st, 2010, I have not found a Ruby implementation on Windows that is [...]]]></description>
			<content:encoded><![CDATA[<blockquote cite="http://twitter.com/hotgazpacho/status/7283089460"><p>I now believe that if you&#8217;re serious about creating Rails apps, you aren&#8217;t doing it on Windows. Or, you are a masochist.</p>
</blockquote>
<p>That’s a quote from me. I’m done trying to do serious Ruby &amp; Rails development on Windows. As of January 1st, 2010, I have not found a Ruby implementation on Windows that is fast enough to support the TDD/BDD workflow that <a href="http://www.coreyhaines.com/">Corey Haines</a> exhibits in his <a href="http://katas.softwarecraftsmanship.org/?p=12">Number to LCD code kata</a>. On top of that, I wasted 2 days on trying to get <a href="http://seleniumhq.org/">Selenium</a> and <a href="http://cukes.info">Cucumber</a> to work together in Windows. I was venting about this on Twitter when <a href="http://www.coryfoy.com/">Cory Foy</a> made a suggestion:</p>
<blockquote cite="http://twitter.com/cory_foy/status/7270114092"><p>@<a href="http://twitter.com/hotgazpacho">hotgazpacho</a> You know, I don&#8217;t know why you don&#8217;t just run a VM with Linux on it for Rails dev. That&#8217;s what I have on my Windows box.</p>
</blockquote>
<p>I didn’t know why either. My first concern was memory consumption (my personal notebook only has 2 GB of RAM in it), but both Cory and <a href="http://blog.adsdevshop.com/">Robert Dempsey</a> allayed my fears:</p>
<blockquote cite="http://twitter.com/cory_foy/status/7272468693"><p>@<a href="http://twitter.com/hotgazpacho">hotgazpacho</a> 2GB should be plenty. The Linux VM should only need 512. Would help to run the VM on an external drive if you&#8217;ve got one</p>
</blockquote>
<blockquote cite="http://twitter.com/rdempsey/status/7272539736"><p>@<a href="http://twitter.com/cory_foy">cory_foy</a> @<a href="http://twitter.com/hotgazpacho">hotgazpacho</a> I run linux ubuntu vm&#8217;s (vmware) on my MBP and 512 is more than enough if you don&#8217;t use a heavy IDE. Runs very well</p>
</blockquote>
<p>So, I went ahead and set up <a href="http://www.ubuntu.com/">Ubuntu</a> 9.10 in a <a href="http://www.virtualbox.org/">VirtualBox</a> virtual machine (VirtualBox is a free virtualization product from Sun, similar to VMWare Workstation or Microsoft Virtual PC). The results were astounding! On a Rails app I was working on, all the RSpec examples and Cucumber features ran in less than the time it took for the MingW Ruby interpreter to start up. WOW! We’re talking orders of magnitude faster, and all in less memory than it takes to boot Windows. I’m sold.</p>
<h3>Here’s how I set up the VM:</h3>
<ol>
<li>Install VirtualBox </li>
<li>Create a new VB VM for Ubuntu      <br />The <a href="https://help.ubuntu.com/community/VirtualBox/FirstVM">Ubuntu Community wiki</a> has pretty good documentation (for Ubuntu host, but UI is pretty much identical on Windows) </li>
<li>Make sure the system is up-to-date <em>(it won&#8217;t be)</em>. Let update manager run &amp; reboot </li>
<li>Install Virtual Box additions &amp; reboot </li>
<li>Install pre-requirements for building stuff <em>(note: I may be missing some stuff. If I am, Ruby Enterprise Edition installer will let you know and tell you what is missing)</em>:
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential libpcre3 libxml2-dev libxslt1-dev sqlite3 libsqlite3-dev –y</div></td></tr></tbody></table></div>
</li>
<li><a href="http://www.rubyenterpriseedition.com/download.html">Ruby Enterprise Edition</a> <em>(cause this is what I run on my production server)</em>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-c</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: #000000;">66162</span><span style="color: #000000; font-weight: bold;">/</span>ruby-enterprise-1.8.7-<span style="color: #000000;">2009.10</span>.tar.gz &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">&lt;</span>br <span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf ruby-enterprise-1.8.7-<span style="color: #000000;">2009.10</span>.tar.gz &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;</span>br <span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>ruby-enterprise-1.8.7-<span style="color: #000000;">2009.10</span><span style="color: #000000; font-weight: bold;">/</span>installer</div></td></tr></tbody></table></div>
<p></li>
<li>Add Ruby Enterprise Edition bin path to &quot;secure path&quot; for sudo
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> visudo</div></td></tr></tbody></table></div>
<p>Change line starting with Defaults to the following:       </p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Defaults env_reset, secure_path=/opt/ruby-enterprise-1.8.7-2009.10/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</div></td></tr></tbody></table></div>
</li>
<li>Install <a href="http://github.com/lexrupy/gmate">gmate</a>, which makes gEdit behave like TextMate. Instructions are on the gmate github page.       </li>
<li>Make gem <em>not</em> install rdoc and ri by default.
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;gem: --no-rdoc --no-ri&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.gemrc</div></td></tr></tbody></table></div>
</li>
<li>Install Rails, Sqlite, ZenTest, RSpec, Cucumber, &amp; Factory Girl
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem i rails sqlite3-ruby ZenTest rspec cucumber factory_girl</div></td></tr></tbody></table></div>
</li>
<li>Make cucumber feature running part of autospec runs
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;export AUTOFEATURE=true&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></td></tr></tbody></table></div>
</li>
</ol>
<h3>One Minor Problem…</h3>
<p>There’s only one minor problem with this whole setup. Cory Foy articulated it best:</p>
<blockquote cite="http://twitter.com/cory_foy/status/7279949479"><p>@<a href="http://twitter.com/hotgazpacho">hotgazpacho</a> The problem is now you&#8217;ll /really/ not be happy doing Rails on Windows. Ever. <img src='http://hotgazpacho.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</blockquote>
<p>This is a problem I can live with <img src='http://hotgazpacho.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>For some additional fun…</h3>
<p>…you might want to install the following:</p>
<ol>
<li><a href="http://github.com/lvv/git-prompt">git-prompt</a>, bash prompt with GIT, SVN and HG modules       </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>lvv<span style="color: #000000; font-weight: bold;">/</span>git-prompt.git <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;. ~/git-prompt/git-prompt.sh&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></td></tr></tbody></table></div>
</li>
<li>Autotest/Autospec notifications to Ubuntu system notifications <em>(similar to Growl on OS X)</em>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem i test_notifier <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;require 'test_notifier/autotest'&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.autotest</div></td></tr></tbody></table></div>
</li>
<li>Sounds for Autotest events &#8211; <a href="http://www.fozworks.com/2007/7/28/autotest-sound-effects">http://www.fozworks.com/2007/7/28/autotest-sound-effects</a>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mpg321 <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-c</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.fozworks.com<span style="color: #000000; font-weight: bold;">/</span>static<span style="color: #000000; font-weight: bold;">/</span>autotest-sound-<span style="color: #000000;">1</span>_2.zip <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">gunzip</span> autotest-sound-<span style="color: #000000;">1</span>_2.zip <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;require '~/autotest/sound/sound.rb'&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.autotest <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Autotest::Sound.sound_path = '~/autotest/sound/sound_fx/'&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.autotest</div></td></tr></tbody></table></div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2010/01/setting-up-ubuntu-9-10-for-ruby-and-rails-development-in-virtualbox-on-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Continuous Integration: Executing Remote Tasks with TeamCity, MSBuild, RemCom, and ExecParse</title>
		<link>http://hotgazpacho.org/2009/10/continuous-integration-executing-remote-tasks-with-teamcity-msbuild-remcom-and-execparse/</link>
		<comments>http://hotgazpacho.org/2009/10/continuous-integration-executing-remote-tasks-with-teamcity-msbuild-remcom-and-execparse/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 03:48:09 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[TeamCity]]></category>

		<guid isPermaLink="false">http://hotgazpacho.org/2009/10/continuous-integration-executing-remote-tasks-with-teamcity-msbuild-remcom-and-execparse/</guid>
		<description><![CDATA[I spent most of last week at work improving our build process, so I thought I’d share with you, and my future self, how I accomplished this. First, Why? We practice continuous integration (CI) at my office. This means we have a server, specifically TeamCity, monitor our source control repository and perform various builds on [...]]]></description>
			<content:encoded><![CDATA[<p>I spent most of last week at work improving our build process, so I thought I’d share with you, and my future self, how I accomplished this.</p>
<h3>First, Why?</h3>
<p>We practice continuous integration (CI) at my office. This means we have a server, specifically <a href="http://www.jetbrains.com/teamcity/">TeamCity</a>, monitor our source control repository and perform various builds on a clean system (thus avoiding the “it works on my machine!” syndrome). In addition to performing continuous builds (whenever someone checks code in), we also perform full builds at regular intervals throughout the day. We also perform a more exhaustive nightly build, where in addition to compiling our suite, we also deploy the built suite to our lab server for more processing. This additional processing entails running a program to create database schemas on the 3 database platform we support (SQL Server, Oracle, &amp; Access), perform conversions from one version of the suite to another, and validate the results.</p>
<p>Sounds straight-forward enough, right? Well, there’s one really big wrinkle here: our build servers are physical servers located in Texas, our lab servers (app server and two database servers) are virtual machines located in Florida, and between them is, shall I say, a <em>really crappy</em> network connection. How crappy? Well, if we run the database creation and validation app on our lab app server, the process takes about 45 minutes. If we run the creation and validation app on our build servers, the process takes <em>significantly</em> longer (I’ve been told 4-6 hours). That extended length is not acceptable, as it interferes with our ability to create the MSIs that we use the next day for integration testing and QA.</p>
<p>To get around this, our nightly build process stopped at copying a zip archive of the compiled suite to our lab server. We then relied on a couple of scheduled tasks on the lab server to run batch files to unzip the suite and run the database creation and validation app. This worked, but had a major draw back. If the creation and validation script failed, it sent an email. However, only a very small number of the team received this email. Since the CI server had no knowledge of this process, it could not fail the build, and the majority of the team would go on not knowing that the suite was effectively broken in a way that would only be apparent at run-time, and only if we happened to exercise a certain bit of functionality that relied on the database schema being valid.</p>
<p>In other words, the risk of massive wasted team productivity was very high.</p>
<p><span id="more-70"></span></p>
<h3>Now, How</h3>
<p>As I mentioned before, we use TeamCity as our CI server. We build a suite of applications for Windows clients and servers, so we use MSBuild as our build system. MSBuild has a built-in task called Exec, which allows you to execute any command, and if the command returns a non-zero exit code, it is considered to have failed. This is great, except that it executes the command on the current machine (recall that the build server is in Texas, but we need the database app to run on the server in Florida.</p>
<h4>PsExec: A False Start</h4>
<p>My first thought for remotely executing commands on a Windows server was to use <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx">PsExec</a> from the <a href="http://technet.microsoft.com/en-us/sysinternals/default.aspx">SysInternals</a> Suite. This worked great, as long as I ran the MSBuild script from my local machine. However, as I discovered after combing the SysInternals forums, PsExec does some funky things with standard in (stdin) and standard error (stderr), such that Java processes (which TeamCity is), seem to hang when calling PsExec. That is, PsExec does not appear to return control to the spawning Java process in the manner that it expects. So, even though the remote processes would execute properly, they would not return control to TeamCity, nor would it provide the exit code of the remote process. As a result, not only would the build fail (we configured TeamCity to fail the build if it ran more than 2 hours), but it would fail for the wrong reason, and continue to mask the real reason from the majority of the team.</p>
<p>This would not do, no sir. So I set out in search of an alternative.</p>
<h4>RemCom: A New Hope</h4>
<p>After much searching, I came across <a href="http://talhatariq.wordpress.com/projects/remote-command-executor-xrce/">RemCom</a>, “the open source psexec”. RemCom performed the same function as PsExec, but it did so without funky stdin/stderr redirection. So, I added RemCom to the build process, adjusted the build scripts accordingly, and kicked off a new nightly build in TeamCity. The build finished in about 90 minutes, and it succeeded! Except for one problem: I knew there was still a problem with the databases, so I was expecting it to fail. Sure enough, I checked the logs and found that RemCom had provided all the output of the remote commands (something PsExec never did, btw), including printing the exit code returned. However, it seems that exit code was not being bubbled up to RemCom. So, we had a situation where RemCom was telling us the remote command failed, but RemCom itself was returning a successful exit code, and so MSBuild saw this as successful.</p>
<h4>Exec Task: The Empire Strikes Back</h4>
<p>It was great that I was getting the output of the remote commands, but now I needed to parse it. Unfortunately, the Exec task that comes with MSBuild simply does not provide you with the ability to capture the output and do anything meaningful with it. So, it was time to look elsewhere.</p>
<h4>ExecParse: The Return of the Exit Code</h4>
<p>After a little bit of Googling, I came across <a href="http://code.google.com/p/execparse/">ExecParse</a>:</p>
<blockquote><p>A custom MSBuild task that inherits from the Exec MSBuild task. The task adds a parameter to allow parsing of the output using regular expressions, and reporting to the MSBuild logger (and consequently the VS.Net IDE).</p></blockquote>
<p>Bingo!</p>
<p>I then added a reference to the task library in our build script and followed the simple directions to create a configuration with a simple regular expression to grab the exit code of the remote command from RemCom. </p>
<p><code class="codecolorer xml vibrant"><span class="xml"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UsingTask</span> <span style="color: #000066;">AssemblyFile</span>=<span style="color: #ff0000;">&quot;ExecParse.dll&quot;</span> <span style="color: #000066;">TaskName</span>=<span style="color: #ff0000;">&quot;ExecParse.ExecParse&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DeployServerHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>nasrvfl7004<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DeployServerHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DeployServerLocalPath</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ExecParseConfiguration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Error<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Search<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Remote command returned (-?[1-9]\d*)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Search<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Message<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Remote command failed with error code $1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Message<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Error<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ExecParseConfiguration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/PropertyGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CreateDbsOnServer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Message</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;Creating databases on Server $(DeployServerHost)...&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Error</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;Build and Deploy selected, but the DeployServerHost was not not specified&quot;</span> <span style="color: #000066;">Condition</span>=<span style="color: #ff0000;">&quot;'$(DeployServerHost)'==''&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/Error<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Error</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;Build and Deploy selected, but the DeployServerLocalPath was not specified&quot;</span> <span style="color: #000066;">Condition</span>=<span style="color: #ff0000;">&quot;'$(DeployServerLocalPath)'==''&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/Error<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Copy</span> <span style="color: #000066;">SourceFiles</span>=<span style="color: #ff0000;">&quot;RemCom.exe;CreateDbsOnServer.bat&quot;</span> <span style="color: #000066;">DestinationFolder</span>=<span style="color: #ff0000;">&quot;$(DeployLocation)&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ExecParse</span></span><br />
<span style="color: #009900;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">Command</span>=<span style="color: #ff0000;">&quot;RemCom.exe \\$(DeployServerHost) /d:$(DeployServerLocalPath) $(DeployServerLocalPath)\CreateDbsOnServer.bat $(DeployServerLocalPath)&quot;</span></span><br />
<span style="color: #009900;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">Configuration</span>=<span style="color: #ff0000;">&quot;$(ExecParseConfiguration)&quot;</span> </span><br />
<span style="color: #009900;">&nbsp; &nbsp; &nbsp; <span style="color: #000066;">ErrorCausesFail</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></span></code></p>
<p>That, right there, was the secret sauce. Now, we can execute remote tasks from our CI build, include their output in the build log, and fail the build if those commands fail. NICE!</p>
<p>Going forward, we’re going to investigate including the remote commands into the full builds, as they run reasonably quickly enough. We will probably want to investigate adding another build agent, as this would tie up the build server for 90 minutes, thus preventing the continuous builds from running in a timely manner.</p>
<h3>Epilogue</h3>
<p>Pavel Sher, presumably from JetBrains, contacted me via Twitter and <a href="http://twitter.com/spav5/status/4917299743">suggested that I try the latest TeamCity EAP</a>. Pavel tells me that PsExec is working now with this version (would be a 5.0 EAP). Though I am not in a position to go upgrading TeamCity right now, I thought I should include this bit of info, in case someone reading this is.</p>
]]></content:encoded>
			<wfw:commentRss>http://hotgazpacho.org/2009/10/continuous-integration-executing-remote-tasks-with-teamcity-msbuild-remcom-and-execparse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
