<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bright Chimp</title>
	<atom:link href="http://brightchimp.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brightchimp.com</link>
	<description>Thoughts from a bald monkey</description>
	<lastBuildDate>Tue, 14 Dec 2010 10:19:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='brightchimp.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bright Chimp</title>
		<link>http://brightchimp.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brightchimp.com/osd.xml" title="Bright Chimp" />
	<atom:link rel='hub' href='http://brightchimp.com/?pushpress=hub'/>
		<item>
		<title>Testing Multiple Versions of Internet Explorer Using Virtual PC</title>
		<link>http://brightchimp.com/2009/01/22/install-multiple-versions-of-internet-explorer-for-free-using-virtual-pc/</link>
		<comments>http://brightchimp.com/2009/01/22/install-multiple-versions-of-internet-explorer-for-free-using-virtual-pc/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 21:52:52 +0000</pubDate>
		<dc:creator>Bright Chimp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brightchimp.com/?p=68</guid>
		<description><![CDATA[Get multiple versions of IE running on a single PC for free - without hacked standalones. Microsoft love us web developers *ahem* and provide free VM's for us to test IE on.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=68&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Did you know that there&#8217;s a free way to have multiple versions of Internet Explorer running natively on a single PC? Well now you do! Here&#8217;s how to get it and why you should care&#8230;</p>
<h2>Why Bother at All?</h2>
<p>Every time I make change to to the design of our <a title="Gardening Community Website" href="http://www.growsonyou.com" target="_self">gardening website</a> I need to check that I haven&#8217;t broken anything. In an ideal world I&#8217;d test the site on all combinations of browser and OS; realistically IE and Firefox covers 99% of our visitors so that is what I focus on. Testing with IE (specifically IE6) is a very unpleasant, but unavoidable part of web design.</p>
<h2>How to Test Multiple Versions of IE?</h2>
<p>Since it can&#8217;t be avoided, the main ways Web Designers have to test the various versions of Internet Explorer are:</p>
<ol>
<li> Use the standalone versions (a good option)</li>
<li>Use the free Virtual PC images from MS to run different OS&#8217;s and browsers on one PC (what I&#8217;m doing)</li>
<li>Buy lots of hardware and Windows licences (which I have no intention of doing)</li>
</ol>
<h2>Why Not Use Standalone Internet Explorer?</h2>
<p>Using the <a href="http://tredosoft.com/Multiple_IE" target="_self">standalone versions of internet explorer</a> has worked well for me in the past but conditional comments need a registry edit to work properly and some other stuff doesn&#8217;t work at all. It&#8217;s all explained on the site and whoever created the standalones did a great job. There are still a couple of reasons I&#8217;d prefer to use the MS provided Virtual PC images.</p>
<ol>
<li>Bearing in mind how rubbish IE is generally, I&#8217;m not filled with confidence that hacked standalone versions will behave in the same way they do when installed &#8216;cleanly&#8217; as MS intended.</li>
<li>I use <a href="http://wtr.rubyforge.org/" target="_self">WATIR</a> to automate a quick visit to each page and check there are no horrendous rendering errors; running a WATIR script automatically opens, and tests with, the &#8216;installed&#8217; version of IE. This means if you have IE7 installed properly and IE6 installed as the standalone version, you can&#8217;t run WATIR tests on IE6 (well, I don&#8217;t know how &#8211; suggestions welcome).</li>
</ol>
<h2>Testing Multiple Versions of IE on a Single PC (For Free)</h2>
<p>Although Virtual PC itself is free, normally you need to buy extra Windows license for each Virtual Machine. Fortunately Microsoft provide free images that allow the likes of you and me to test different versions of Internet Explorer. The catch is that the images expire after a few months &#8211; as a guide, the ones I downloaded today (20th Jan &#8217;09) have been out since Dec &#8217;08 and are good until the end of April &#8217;09.</p>
<h2>Installing Virtual PC and Images</h2>
<p>Once you <a href="http://www.microsoft.com/windows/downloads/virtualpc/default.mspx" target="_self">download Virtual PC</a> (for free), installation is an absolute doddle; just run setup.exe and keep clicking &#8216;next&#8217;.</p>
<p>The same goes for downloading and extracting the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&amp;displaylang=en" target="_self">IE VPC images</a>; aside from choosing a directory for them there&#8217;s nothing to it.</p>
<h2>Starting a VPC Image</h2>
<p>To get started running one of the disk images, start up Microsoft Virtual PC (Start &gt; All Program &gt; Microsoft Virtual PC). There&#8217;ll be no virtual machines by default so click on &#8216;New&#8230;&#8217; to set one up&#8230;</p>
<p>There&#8217;s a bunch of screen shots at the bottom of this post that show the process, but basically you want to create a new Virtual PC, choose a name, OS, RAM and then select to use &#8216;An existing virtual hard disk&#8217; (the image you downloaded earlier from Microsoft).</p>
<p>That&#8217;s it! If you go to the Virtual PC Console, select the Virtual Machine you just set up and click on &#8216;Start&#8217; You will have another version of Windows start up as if it&#8217;s an app running on your physical machine &#8211; cool huh?</p>
<h2>Networking</h2>
<p>I had one small issue with networking which was easily resolved from the VPC console. My physical PC has two network cards with only one actually connected. The virtual PC&#8217;s I set up all opted to use the disconnected one by default. If your VM doesn&#8217;t have connectivity go to the VPC console, select the VM you&#8217;re having issues with and click on &#8216;settings&#8217;. Double click on &#8216;Networking&#8217; and choose the port your VM should use.</p>
<h2>Notes&#8230;</h2>
<p>I installed VPC 2007, SP1 which according to the site runs on: Windows XP Professional, Windows XP Tablet PC, Windows Server 2003, Windows Vista Business, Windows Vista Enterprise, and Windows Vista Ultimate.</p>
<h2>Screenshots of setting up a Virtual PC</h2>
<div id="attachment_71" class="wp-caption alignnone" style="width: 369px"><img class="size-full wp-image-71" title="Create a new Virtual PC" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-1.jpg?w=359&#038;h=254" alt="Select &quot;New...&quot; to create a new Virtual Machine" width="359" height="254" /><p class="wp-caption-text">Select &quot;New...&quot; to create a new Virtual PC</p></div>
<div id="attachment_72" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-72" title="Select &quot;Create a Virtual PC&quot;" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-3.jpg?w=503&#038;h=393" alt="Choose &quot;Create a Virtual Machine&quot;" width="503" height="393" /><p class="wp-caption-text">Choose &quot;Create a Virtual PC&quot;</p></div>
<div id="attachment_73" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-73" title="Name your new VPC" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-4.jpg?w=503&#038;h=393" alt="Choose a sensible name for your VM" width="503" height="393" /><p class="wp-caption-text">Choose a sensible name for your VPC</p></div>
<div id="attachment_74" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-74" title="Choose the correct operating systems" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-5.jpg?w=503&#038;h=393" alt="Choose the correct operating system (the free ones are XP)" width="503" height="393" /><p class="wp-caption-text">Choose the correct operating system (the free ones are XP)</p></div>
<div id="attachment_75" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-75" title="Choose the RAM the VPC Should use" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-6.jpg?w=503&#038;h=393" alt="I accepted the default 128MB RAM" width="503" height="393" /><p class="wp-caption-text">I accepted the default 128MB RAM</p></div>
<div id="attachment_76" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-76" title="Select 'Existing virtual Hard Disk" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-7.jpg?w=503&#038;h=393" alt="Select 'Existing Virtual Hard Disk'" width="503" height="393" /><p class="wp-caption-text">Select &#39;Existing virtual Hard Disk&#39;</p></div>
<div id="attachment_77" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-77" title="Browse to your extracted vhd file" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-9.jpg?w=503&#038;h=393" alt="Choose the .VHD file downloaded earlier" width="503" height="393" /><p class="wp-caption-text">Choose the .VHD file downloaded earlier</p></div>
<div id="attachment_78" class="wp-caption alignnone" style="width: 513px"><img class="size-full wp-image-78" title="Finish VPC Setp" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-10.jpg?w=503&#038;h=393" alt="Just click 'Finish' and you're hot to trot" width="503" height="393" /><p class="wp-caption-text">Just click &#39;Finish&#39; and you&#39;re hot to trot</p></div>
<div id="attachment_79" class="wp-caption alignnone" style="width: 369px"><img class="size-full wp-image-79" title="New Virtual PC displayed in VPC console" src="http://interruptions.files.wordpress.com/2009/01/vhd-start-11.jpg?w=359&#038;h=254" alt="Your new Virtual Machine is displayed in your VPC console." width="359" height="254" /><p class="wp-caption-text">Your new Virtual PC is displayed in your VPC console.</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interruptions.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interruptions.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interruptions.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=68&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brightchimp.com/2009/01/22/install-multiple-versions-of-internet-explorer-for-free-using-virtual-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be87387daacc263ef3a002f7c12a4727?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Bright Chimp</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-1.jpg" medium="image">
			<media:title type="html">Create a new Virtual PC</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-3.jpg" medium="image">
			<media:title type="html">Select &#34;Create a Virtual PC&#34;</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-4.jpg" medium="image">
			<media:title type="html">Name your new VPC</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-5.jpg" medium="image">
			<media:title type="html">Choose the correct operating systems</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-6.jpg" medium="image">
			<media:title type="html">Choose the RAM the VPC Should use</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-7.jpg" medium="image">
			<media:title type="html">Select 'Existing virtual Hard Disk</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-9.jpg" medium="image">
			<media:title type="html">Browse to your extracted vhd file</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-10.jpg" medium="image">
			<media:title type="html">Finish VPC Setp</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2009/01/vhd-start-11.jpg" medium="image">
			<media:title type="html">New Virtual PC displayed in VPC console</media:title>
		</media:content>
	</item>
		<item>
		<title>Hand drawn speech bubble using CSS3 border-image</title>
		<link>http://brightchimp.com/2008/09/07/hand-drawn-speac-bubble-using-css3-border-image/</link>
		<comments>http://brightchimp.com/2008/09/07/hand-drawn-speac-bubble-using-css3-border-image/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 19:17:27 +0000</pubDate>
		<dc:creator>Bright Chimp</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[web stuff]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://interruptions.wordpress.com/?p=36</guid>
		<description><![CDATA[A quick play with 'border-image', a new CSS3 property, to create a hand drawn speech bubble that stretches to any sized content.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=36&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Why create a hand-drawn speech bubble?</h3>
<p>I&#8217;ve noticed more and more hand drawn elements and rough edges being incorporated into site designs. Andy Clarke&#8217;s fabulous <a title="Andy Clarke's site" href="http://www.stuffandnonsense.co.uk/">Stuff and Nonsense</a> and <a title="Erskine Design" href="http://www.erskinedesign.com/">Erskine design</a> both use rough edged dividing lines which I really like. I even borrowed the idea for our <a title="Grows on You" href="http://www.growsonyou.com">gardening website</a>, Grows on You, to get an &#8216;organic&#8217; feel in the design &#8211; particularly in the soil footer. Greg Wood (of Erskine) has also introduced hand drawn elements (including a super cool ginger bread man) into his recent <a title="Greg Wood, web designer" href="http://www.greg-wood.co.uk/blog/article/a-little-more-about-the-redesign">redesign</a>.</p>
<p>Basically, I like the natural look, and a <a title="CSS3 border-image" href="http://ejohn.org/blog/border-image-in-firefox/">recent post</a> on the new <em>border-image</em> CSS3 property got me thinking about hand drawn speech bubbles &#8211; the sort of thing that might be used for comments in a design with a   hand-drawn theme.</p>
<h3>Caveat &#8211; Does not work in all browsers</h3>
<p><a href="http://www.css3.info/">CSS3</a> is not finalised yet and this method will only work in certain browsers. The only one I have tested, and the one I used to get my screen shots, is Safari. I also believe the nightly build of Firefox support border-image.</p>
<h3>How I created the Speech bubble using CSS3</h3>
<p>First I created a speech bubble image; it&#8217;s 100 x 100 pixels and I tried a few different ways of getting lines that had a hand drawn feel &#8211; you can see it zoomed in below, together with guiding lines. I used the guidelines so I new which parts of the image would get stretched and where the corners (which aren&#8217;t stretched) should go. Starting at the top, they&#8217;re 15px 15px 15px and 30px in from the sides &#8211; numbers you&#8217;ll see again later in the CSS.</p>
<div id="attachment_37" class="wp-caption alignnone" style="width: 303px"><a href="http://interruptions.files.wordpress.com/2008/09/bubble_pic.jpg"><img class="size-full wp-image-37" title="bubble_pic" src="http://interruptions.files.wordpress.com/2008/09/bubble_pic.jpg?w=293&#038;h=248" alt="Speech bubble" width="293" height="248" /></a><p class="wp-caption-text">Speech bubble</p></div>
<p>Next for the html &#8211; nothing special there, just a div with a class of &#8220;comment&#8221;.</p>
<h3>The HTML</h3>
<p><code>&lt;div class="comment"&gt;<br />
&lt;p&gt;Hey. great idea!&lt;/p&gt;<br />
&lt;p&gt;Well, it would be if you could draw.&lt;/p&gt;<br />
&lt;p&gt;These hand drawn style designs are all well and good, but wouldn't the speech bubble look better if it wasn't drawn by a two year old?&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;div class="comment"&gt;<br />
&lt;p&gt;And what about tiny comments?&lt;/p&gt;<br />
&lt;/div&gt;</code></p>
<p>Then for the CSS; this is taken almost straight from the example I mentioned earlier with a few tweaks to the border sizes.</p>
<h3>The CSS</h3>
<p><code>.comment{<br />
border-width: 15px 15px 15px 30px;<br />
-o-border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
-icab-border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
-khtml-border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
-moz-border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
-web-kit-border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
border-image: url(bubble.gif) 15 15 15 30 stretch stretch;<br />
}</code></p>
<p>All the browser vendors have their own syntax for the border image property, but one day (hopefully) you&#8217;ll only need the first and last line of all that CSS.</p>
<h3>The end results</h3>
<p>After a few versions of the speech bubble image, here&#8217;s what I ended up with:</p>
<div id="attachment_41" class="wp-caption alignnone" style="width: 263px"><a href="http://interruptions.files.wordpress.com/2008/09/screen_shot2.jpg"><img class="size-full wp-image-41" title="screen shot" src="http://interruptions.files.wordpress.com/2008/09/screen_shot2.jpg?w=253&#038;h=272" alt="The speech bubbles" width="253" height="272" /></a><p class="wp-caption-text">The speech bubbles</p></div>
<p>There&#8217;s definitely room for improvement but I like that I have a hand drawn container that will stretch to hold whatever you put in it. Now all I need to do is use web fonts to get some pretty handwriting inside the bubble.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interruptions.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interruptions.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interruptions.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interruptions.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interruptions.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=36&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brightchimp.com/2008/09/07/hand-drawn-speac-bubble-using-css3-border-image/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be87387daacc263ef3a002f7c12a4727?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Bright Chimp</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2008/09/bubble_pic.jpg" medium="image">
			<media:title type="html">bubble_pic</media:title>
		</media:content>

		<media:content url="http://interruptions.files.wordpress.com/2008/09/screen_shot2.jpg" medium="image">
			<media:title type="html">screen shot</media:title>
		</media:content>
	</item>
		<item>
		<title>Gotchas migrating rails file_column to use Amazon S3</title>
		<link>http://brightchimp.com/2008/09/04/gotchas-migrating-rails-file_column-to-use-amazon-s3/</link>
		<comments>http://brightchimp.com/2008/09/04/gotchas-migrating-rails-file_column-to-use-amazon-s3/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 22:02:11 +0000</pubDate>
		<dc:creator>Bright Chimp</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[web stuff]]></category>

		<guid isPermaLink="false">http://interruptions.wordpress.com/?p=24</guid>
		<description><![CDATA[Issues with using the file_column ruby on rails plugin, plus gotchas migrating it to use Amazon S3.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=24&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re already using file_column, or thinking of migrating file_column to use S3, here&#8217;s the gotchas I&#8217;ve come across so far in migrating the photos for Grows on You, our <a title="Grows on You" href="http://www.growsonyou.com">gardening website</a>.</p>
<h3>Limit on file_column uploads</h3>
<p>file_column puts all uploaded files in one directory, so if you hit 32k photos (or whatever) you hit an operating system limit and it barfs with this error&#8230;</p>
<p>Errno::EMLINK (Too many links -/some/file/column/storage/directory).</p>
<p>This means you have to delete the local files after putting them on S3 if you want to handle more than 32,000 uploads. Which leads nicely onto gotcha number 2&#8230;</p>
<h3>file_column plugin still needs the local files (kinda)</h3>
<p>If you move files to S3 and then start removing them locally (to free up disk space or stay below 32k files) validations that require the file to exist will fail. In our case, we have a file_column validation on filesize. Since the validation requires the local file to check file size, it errors if the file isn&#8217;t there.</p>
<p>To get round this, we set a flag (we called it stored_remotely) on the Photo object. This is checked in the file_column validations code and the validation is skipped if it&#8217;s set to true. We set the flag after the initial upload and we&#8217;ve confirmed it&#8217;s on S3. Which is where gotcha numer 2 blends seemlessly into gotcha number 3&#8230;</p>
<h3>S3 gets confused over plus signs in keys</h3>
<p>Trying to confirm an object was stored to S3 using S3Object.find fails if the key you used had a &#8216;+&#8217;. Say you you have an S3 object with a &#8216;+&#8217; in the key; if you try to do an S3Object.find for an object with &#8216;+&#8217; in the key, it fails. However, it finds the object if you replace the &#8216;+&#8217; with a space. When you list objects, the returned keys also has spaces instead of any plus signs. To work around you need to replace the &#8216;+&#8217; with a space.</p>
<p>Here&#8217;s the weird thing: If the object is an image and you&#8217;re serving it directly from S3, having plus signs in the uri works just fine, for example:</p>
<p>&lt;img src =&#8221;http://bucketname.s3.amazonaws.com/key+name_with_a_plus.jpg&#8221;/&gt; serves the image just fine, but&#8230;</p>
<p>AWS::S3::S3Object.find(http://bucketname.s3.amazonaws.com/key+name_with_a_plus.jpg , bucket_name) fails to fnd the object but it does find the object using a key name of &#8220;key name_with_a_plus.jpg&#8221;</p>
<p>Hope this saves you some time and hair pulling.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interruptions.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interruptions.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interruptions.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interruptions.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interruptions.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=24&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brightchimp.com/2008/09/04/gotchas-migrating-rails-file_column-to-use-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be87387daacc263ef3a002f7c12a4727?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Bright Chimp</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting started with S3 and Ruby on Rails</title>
		<link>http://brightchimp.com/2008/07/29/getting-started-with-amazon-s3-and-ruby-on-rails/</link>
		<comments>http://brightchimp.com/2008/07/29/getting-started-with-amazon-s3-and-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 20:48:39 +0000</pubDate>
		<dc:creator>Bright Chimp</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[web stuff]]></category>
		<category><![CDATA[rails tech s3]]></category>

		<guid isPermaLink="false">http://interruptions.wordpress.com/?p=3</guid>
		<description><![CDATA[Getting Ruby on Rails set up for use with Amazon S3 and uploading a file from the command line.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=3&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Why I&#8217;m using S3 with Rails&#8230;</h3>
<p>The motivation for this at the moment is to use S3 as a backup for large image files posted on our <a title="Grows on You" href="http://www.growsonyou.com">gardening website</a> which we don&#8217;t serve and to free up some disk space on our servers. We use file_column but that probably isn&#8217;t too relevant for this post. We don&#8217;t, at the moment, want to serve images from S3.</p>
<p>If you haven&#8217;t already implemented file upload and storage with Ruby on Rails you might still find this post useful but both <a title="attachment_fu plugin site" href="http://agilewebdevelopment.com/plugins/attachment_fu">attachment_fu</a> and <a title="Paperclip website" href="http://www.thoughtbot.com/projects/paperclip">paperclip</a> support S3 out of the box so you might want to look there.</p>
<h3>Basic setup of S3 with Ruby&#8230;</h3>
<p>First the obvious &#8211; set up an account with <a title="Amazon's Web services" href="http://www.amazon.com/gp/browse.html?node=3435361" target="_self">Amazon&#8217;s Web Services</a>.</p>
<p>As instructed in the <a title="Intro for ruby developers" href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=846&amp;categoryID=55" target="_self">Intro to AWS for Ruby Developers</a> I installed the S3 gem accepting all dependencies. You should specify the versions for each dependency if you need to know how to re-create your configuration&#8230;<br />
<code><br />
$sudo gem install xml-simple --version 1.0.11<br />
$sudo gem install builder --version 2.1.2<br />
$sudo gem install mime-types --version 1.15<br />
$sudo gem install aws-s3 --version 0.5.1<br />
</code></p>
<p>Or if you don&#8217;t care and just want to get it going&#8230;</p>
<p><code>$sudo gem install aws-s3</code></p>
<p>Before diving in to the code I did a quick test using the useful s3sh (like console but for s3) so start that up.</p>
<p><code>$s3sh</code></p>
<p>Then you&#8217;re ready to get started. I opened an S3 connection, created a bucket and put a file into my new bucket. Bucket names have to be globally unique, not unique to an account, like domain names .<br />
<code><br />
&gt;&gt; AWS::S3::Base.establish_connection!( :access_key_id =&gt; 'your key', :secret_access_key =&gt; 'your secret key')</code></p>
<p><code>=&gt; #&lt;AWS::S3::Connection:0x1588a44 @access_key_id="your key", @options={:persistent=&gt;false, :server=&gt;"s3.amazonaws.com", :port=&gt;80, :access_key_id=&gt;"your key", :secret_access_key=&gt;"your secret key"}, @http=#&lt;Net::HTTP s3.amazonaws.com:80 open=false&gt;, @secret_access_key="your secret key"&gt;</code></p>
<p><code>&gt;&gt; Bucket.create('bucketname')<br />
=&gt; true<br />
&gt;&gt;</code></p>
<p><code>&gt;&gt;AWS::S3::S3Object.store("bonsai.jpg", open("./Desktop/bonsai.jpg"), "bucketname", :access=&gt;:public_read)<br />
=&gt; #&lt;AWS::S3::S3Object::Response:0x11237200 200 OK&gt;</code></p>
<p>Once I&#8217;d done that I put the url in the browser to check I could see the image (Note that if you configure the bucket in any way (e.g. you create a European bucket) it&#8217;s recommended (required?) you put the bucket name first in the URL. Bucket configuration is done when you create it so in the example above I did no configuration and can use&#8230;</p>
<p>http://s3.amazonaws.com/bucketname/bonsai.jpg</p>
<p>If you do configure yours, use&#8230;</p>
<p>http://bucketname.s3.amazonaws.com/bonsai.jpg</p>
<p>So, that was me with Amazon&#8217;s S3 installed and working, now on to getting it working with file_column but more about that later.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interruptions.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interruptions.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interruptions.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interruptions.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interruptions.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=3&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brightchimp.com/2008/07/29/getting-started-with-amazon-s3-and-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be87387daacc263ef3a002f7c12a4727?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Bright Chimp</media:title>
		</media:content>
	</item>
		<item>
		<title>Greetings from chief chimp</title>
		<link>http://brightchimp.com/2008/07/05/hello-world/</link>
		<comments>http://brightchimp.com/2008/07/05/hello-world/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 12:54:11 +0000</pubDate>
		<dc:creator>Bright Chimp</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Well, the advice on blogging seems to be to focus on a particular subject, so your blog has a theme. Fortunately that&#8217;s not how my life is, so this blog is going to be a bit of a mixed bag, and at the moment I don&#8217;t know what to expect. You&#8217;re probably going to find [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=1&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, the advice on blogging seems to be to focus on a particular subject, so your blog has a theme. Fortunately that&#8217;s not how my life is, so this blog is going to be a bit of a mixed bag, and at the moment I don&#8217;t know what to expect.</p>
<p>You&#8217;re probably going to find a few photos and accounts of my travels,  and you&#8217;ll find some techy stuff too &#8211; I&#8217;m co-founder of Grows on You, a place to find garden ideas. We develop in Ruby on Rails so there&#8217;ll be bits of that. You might find the occasional rant about Internet Explorer&#8217;s tragic implementation of CSS too, my apologies in advance far any of them.</p>
<p>Eventually I&#8217;ll get round to doing my own CSS design for this blog.</p>
<p>Basically I hope you find something interesting, and maybe even useful! If not, my mum says she&#8217;ll read it anyway.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interruptions.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interruptions.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interruptions.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interruptions.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interruptions.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brightchimp.com&amp;blog=4148052&amp;post=1&amp;subd=interruptions&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brightchimp.com/2008/07/05/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be87387daacc263ef3a002f7c12a4727?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Bright Chimp</media:title>
		</media:content>
	</item>
	</channel>
</rss>
