<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Article RSS Feed</title>
    <link>http://your-web-site.com/rss/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The main blog feed for my Web site.</description>
    
    
        <item>
          <title>Hotrod Hayride</title>
          <description>&lt;h3&gt;Wall of Death&lt;/h3&gt;
&lt;iframe width=&quot;560&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/LskpLapGJTM&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;

&lt;table style=&quot;width:auto;&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/cqbzIGRq166B6-jWV5359A?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-bzfx8N10Q14/Tja7bAF92eI/AAAAAAAAAUg/aYkj5pC1c-c/s600/DSC_0081.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;table style=&quot;width:auto;&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/jxNjex9HKzmLEy76zwmbNw?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-29Q1Sko6C8w/Tja7dhUfV2I/AAAAAAAAAUo/5gmf3whvgfo/s600/DSC_0085.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;table style=&quot;width:auto;&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/zpJp39kV4g0nLe5fX-l3og?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh6.googleusercontent.com/-KnXEurJWB2o/Tja3mV36Z_I/AAAAAAAAAUE/KtEiFNJN274/s600/DSC_0103.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;table style=&quot;width:auto;&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/iRw9b8-Zhm6PualUqh6nMA?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh3.googleusercontent.com/-s98Jg1EJmHQ/Tja7S_Sx8SI/AAAAAAAAAUY/kgTFL1kJ1xA/s600/DSC_0126.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;table style=&quot;width:auto;&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/IcCrmLIQ7Cf7QKMhEFaCfQ?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-tC0sp_RYuFI/Tja7WHJF0kI/AAAAAAAAAUc/LqnJ-yx2hkY/s600/DSC_0129.jpg&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description>
          <pubDate>Mon, 01 Aug 2011 00:00:00 GMT</pubDate>
          <guid>http://your-web-site.com/news/2011/08/01/hotrod-hayride/</guid>
          <link>http://your-web-site.com/news/2011/08/01/hotrod-hayride/</link>
        </item>
    
        <item>
          <title>Most Rated</title>
          <description>Check out &lt;a href=&quot;http://mostrated.com&quot; target=&quot;_blank&quot;&gt;MostRated.com&lt;/a&gt;</description>
          <pubDate>Thu, 28 Jul 2011 00:00:00 GMT</pubDate>
          <guid>http://your-web-site.com/news/2011/07/28/most-rated/</guid>
          <link>http://your-web-site.com/news/2011/07/28/most-rated/</link>
        </item>
    
        <item>
          <title>ActionView date_select calendar logic in javascript</title>
          <description>&lt;h1&gt;ActionView date_select calendar logic in javascript&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1151384&quot; title=&quot;Here is the gist code snippet&quot;&gt;Here's the Gist&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;
document.observe(&quot;dom:loaded&quot;, function() {
  var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  var dateEl = $('project_expiry_date_3i');
  var monthEl = $('project_expiry_date_2i');
  var yearEl = $('project_expiry_date_1i');
  if (dateEl &amp;&amp; monthEl &amp;&amp; yearEl) {
    var currentDateIndex = dateEl.selectedIndex;
    function leapYearAdjustedDays() {
      var daysInMonth = DAYS_IN_MONTH[monthEl.selectedIndex];
      // Leap year calc.
      var year = parseInt(yearEl.options[yearEl.selectedIndex].value);
      if (monthEl.selectedIndex == 1 &amp;&amp; year % 4 == 0) daysInMonth = 29;
      return daysInMonth;
    }
    function adjustDays() {
      dateEl.options.length = 0;
      for (var idx = 1; idx &lt;= leapYearAdjustedDays(); idx++) { 
        if (currentDateIndex == idx-1)
          dateEl.options[idx-1] = new Option(idx,idx,false,true);
        else       
          dateEl.options[idx-1] = new Option(idx);
      }
    }
    monthEl.observe(&quot;change&quot;, adjustDays);
    yearEl.observe(&quot;change&quot;, adjustDays);
  }
})
&lt;/pre&gt;</description>
          <pubDate>Fri, 24 Jun 2011 00:00:00 GMT</pubDate>
          <guid>http://your-web-site.com/news/2011/06/24/actionview-date_select-calendar-logic-in-javascript/</guid>
          <link>http://your-web-site.com/news/2011/06/24/actionview-date_select-calendar-logic-in-javascript/</link>
        </item>
    
        <item>
          <title>Javascript bitwise encoding</title>
          <description>Here's a quick sample of how to do bitwise encoding in javascript:

&lt;ol class=&quot;CodeRay&quot;&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;var &lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;Encryption&lt;/span&gt; = (function() {&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;  function generateKey(seed) {&lt;/li&gt;
&lt;li&gt;    var key = &lt;span style=&quot;background-color:#fff0f0;color:#D20&quot;&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;while&lt;/span&gt; (key.length &amp;lt; seed) key += &lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;Math&lt;/span&gt;.srand(seed)&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; key&lt;/li&gt;
&lt;li&gt;  }&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#808&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;   * @param 'val' - a String to encode or a byte[] to decode.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;   * @param 'salt' - (Optional) salt to perform bitwise encode&lt;/span&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;/span&gt;decode operation.&lt;/li&gt;
&lt;li&gt;   */&lt;/li&gt;
&lt;li&gt;  function xorHash(val, salt) {&lt;/li&gt;
&lt;li&gt;    var encrypt = typeof val == &lt;span style=&quot;background-color:#fff0f0;color:#D20&quot;&gt;&lt;span style=&quot;color:#710&quot;&gt;'&lt;/span&gt;&lt;span style=&quot;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#710&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    var byteArr = encrypt ? val.toByteArr() : val &lt;/li&gt;
&lt;li&gt;    var keyBytes = typeof salt == &lt;span style=&quot;background-color:#fff0f0;color:#D20&quot;&gt;&lt;span style=&quot;color:#710&quot;&gt;'&lt;/span&gt;&lt;span style=&quot;&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;color:#710&quot;&gt;'&lt;/span&gt;&lt;/span&gt; ? &lt;/li&gt;
&lt;li&gt;      generateKey(byteArr.length).toByteArr() : salt.toByteArr()&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;for&lt;/span&gt; (var i = &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;0&lt;/span&gt;; i &amp;lt; byteArr.length; i++) {&lt;/li&gt;
&lt;li&gt;      byteArr[i] = byteArr[i] ^ keyBytes[i % keyBytes.length]&lt;/li&gt;
&lt;li&gt;    }&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; (encrypt ? byteArr : &lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;String&lt;/span&gt;.fromCharCode.apply(&lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;String&lt;/span&gt;, byteArr))&lt;/li&gt;
&lt;li&gt;  }&lt;/li&gt;
&lt;li&gt;  &lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; {&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#808&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;     *&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;     *&lt;/span&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    encode : function(str, salt) {&lt;/li&gt;
&lt;li&gt;      var encoded = []&lt;/li&gt;
&lt;li&gt;      var bytes = xorHash(str, salt)&lt;/li&gt;
&lt;li&gt;      &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;for&lt;/span&gt; (var i = &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;0&lt;/span&gt;; i &amp;lt; bytes.length; i++) encoded.push(bytes[i].toString(&lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;16&lt;/span&gt;))&lt;/li&gt;
&lt;li&gt;      &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; encoded.join(&lt;span style=&quot;background-color:#fff0f0;color:#D20&quot;&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;    },&lt;/li&gt;
&lt;li&gt;    &lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#808&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;     *&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color:#fff0ff&quot;&gt;&lt;span style=&quot;color:#808&quot;&gt;     *&lt;/span&gt;&lt;span style=&quot;color:#404&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;    decode : function(hsh, salt) {&lt;/li&gt;
&lt;li&gt;      var decoded = []&lt;/li&gt;
&lt;li&gt;      var hshArr = hsh.split(&lt;span style=&quot;background-color:#fff0f0;color:#D20&quot;&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#710&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;      &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;for&lt;/span&gt; (var i = &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;0&lt;/span&gt;; i &amp;lt; hshArr.length; i++) decoded.push(parseInt(hshArr[i], &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;16&lt;/span&gt;))&lt;/li&gt;
&lt;li&gt;      &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; xorHash(decoded, salt)&lt;/li&gt;
&lt;li&gt;    }&lt;/li&gt;
&lt;li&gt;  }&lt;/li&gt;
&lt;li&gt;})()&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;Math&lt;/span&gt;.srand = function(seed) {&lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;if&lt;/span&gt; (!seed) seed = new Date().getTime()&lt;/li&gt;
&lt;li&gt;  seed = (seed*&lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;9301&lt;/span&gt;+&lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;49297&lt;/span&gt;) % &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;233280&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; seed/(&lt;span style=&quot;color:#60E;font-weight:bold&quot;&gt;233280.0&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color:#036;font-weight:bold&quot;&gt;String&lt;/span&gt;.prototype.toByteArr = function() {&lt;/li&gt;
&lt;li&gt;  var arr = []&lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;for&lt;/span&gt; (var i = &lt;span style=&quot;color:#00D;font-weight:bold&quot;&gt;0&lt;/span&gt;;i &amp;lt; this.length; i++) arr.push(this.charCodeAt(i))&lt;/li&gt;
&lt;li&gt;  &lt;span style=&quot;color:#080;font-weight:bold&quot;&gt;return&lt;/span&gt; arr&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
</description>
          <pubDate>Fri, 17 Jun 2011 00:00:00 GMT</pubDate>
          <guid>http://your-web-site.com/news/2011/06/17/javascript-bitwise-encoding/</guid>
          <link>http://your-web-site.com/news/2011/06/17/javascript-bitwise-encoding/</link>
        </item>
    
        <item>
          <title>Independent Stove Installations</title>
          <description>&lt;h1&gt;Independent Stove Installations&lt;/h1&gt;
&lt;p&gt;A good friend of mine from Bristol has trained as a &lt;a target=&quot;_blank&quot; href=&quot;http://hetas.co.uk&quot;&gt;HETAS&lt;/a&gt; engineer which means he is able to install wood burning and multi fuel stoves to the required legal standard for UK building regulations.&lt;/p&gt;
&lt;p&gt;With heating costs climbing and bitter winter weather it's a shrewd move training in this field, plus there's &lt;a target=&quot;_blank&quot; href=&quot;http://www.guardian.co.uk/money/2008/mar/08/householdbills.ethicalliving&quot;&gt;nothing like a good fire&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Naturally every business needs a website and that's where I come in, I put together &lt;a target=&quot;_blank&quot; href=&quot;http://independentstoveinstallations.co.uk&quot;&gt;Independent Stove Installations&lt;/a&gt; another Heroku &amp;amp; Radiant website.&lt;/p&gt;
&lt;p&gt;I've used the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/hairballopolis/radiant-gallery&quot;&gt;Radiant gallery extension&lt;/a&gt;&amp;nbsp;to show the &lt;a target=&quot;_blank&quot; href=&quot;http://independentstoveinstallations.co.uk/recent-installations&quot;&gt;various installations ISI have completed&lt;/a&gt;.&lt;/p&gt;</description>
          <pubDate>Sat, 19 Feb 2011 00:00:00 GMT</pubDate>
          <guid>http://your-web-site.com/news/2011/02/19/independent-stove-installations/</guid>
          <link>http://your-web-site.com/news/2011/02/19/independent-stove-installations/</link>
        </item>
    
        <item>
          <title>RubyProf, Oink and ActiveRecord bloat</title>
          <description>&lt;h3&gt;RubyProf, Oink and ActiveRecord bloat&lt;/h3&gt;
&lt;div class=&quot;posted&quot;&gt;Posted by Steve on December 03, 2010&lt;em&gt;|&lt;/em&gt;&lt;!--img src=&quot;http://spurrd.com/assets/123/comment.png&quot; /--&gt;&lt;a href=&quot;/news/2010/12/03/rubyprof-oink-and-activerecord-bloat/#disqus_thread&quot;&gt;Comments&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;There are some applications that are always gonna hammer the OS, I'm not talking about your common-or-garden web app, think huge amounts of I/O in the shape of huge file uploads, image processing, iso creation, hungry hungry hungry.&lt;/p&gt;
&lt;p&gt;So what to do when you see ruby processes (spawned from passenger) gobbling up 1gb of RAM? The app was already in production so we had to be careful in our approach to profiling and code changes. Time to grab the production db and associated file data and see if the problem could be reproduced locally.&lt;/p&gt;
&lt;p&gt;I'd say this is the hard part of profiling, where to start looking in a fairly large in-production app? A bit f common sense helped here, we knew that there were some expensive processes mainly dealing with large amounts of image processing and large amounts of copying files. My very experienced colleague pointed me at &lt;a target=&quot;_blank&quot; href=&quot;http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/&quot;&gt;this article&lt;/a&gt; detailing common mistakes made when developing with active record.&lt;/p&gt;
&lt;p&gt;So a quick search through the codebase for &lt;span style=&quot;font-family: Courier New;&quot;&gt;all.each&lt;/span&gt; and &lt;span style=&quot;font-family: Courier New;&quot;&gt;find(:all &lt;span style=&quot;font-family: Arial;&quot;&gt;as mentioned in the article lit up some hotspots in the app code where potentially we could be experiencing bloat.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Next step was to wrap these code blocks in a ruby profiler block as detailed &lt;a target=&quot;_blank&quot; href=&quot;http://snippets.aktagon.com/snippets/255-How-to-profile-your-Rails-and-Ruby-applications-with-ruby-prof&quot;&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; then make the app execute the profiled code block - no changes to the code yet - this is just to get a benchmark.&lt;/p&gt;
&lt;p&gt;Now we made a small but apparently very important change removing a programmatic filter on a large collection (one of those &lt;span style=&quot;font-family: Courier New;&quot;&gt;all.each...&lt;/span&gt; buggers&lt;span style=&quot;font-family: Arial;&quot;&gt;) and swapped in a more precise active record find with conditions and some outer joins to get us the desired collection.&lt;/span&gt; The app was restarted and the same test run again leaving the profiling block in place and bingo processing time was one sixth of the previous run, big improvement in changing 4 lines of code.&lt;/p&gt;
&lt;p&gt;But all this was done in a local production copy, we needed verification of what was causing bloat in production, adding profiling to production was a risk we couldn't take but what we did do was add and configure the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/noahd1/oink&quot;&gt;oink gem&lt;/a&gt; which gave us a memory stat in the production logs and after a few hours of normal app use the ability to do&lt;span style=&quot;font-family: Courier New;&quot;&gt; $ oink -t 50 log/production.log&lt;/span&gt; which gives the insightful output:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;---- MEMORY THRESHOLD ----&lt;br /&gt;
THRESHOLD: 50 MB&lt;br /&gt;
&lt;br /&gt;
-- SUMMARY --&lt;br /&gt;
Worst Requests:&lt;br /&gt;
1. Dec 02 11:11:08, 143136 KB, BarController#foo&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;so verification of the bloat as this method was executing the &lt;span style=&quot;font-family: Courier New;&quot;&gt;all.each&lt;/span&gt; mentioned above. All the evidence was converging on this point in code. Marvellous!&lt;/p&gt;
&lt;p&gt;I had never profiled a Rails app before admittedly this was not your average app but the tools used here definitely took us from hunches and presuppositions to good solid evidence and the beginnings of some simple but effective performance refactorings.&lt;/p&gt;
&lt;p&gt;Hope it helps you when your 400lb Gorilla app starts playing up.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://sobyteme.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;http://disqus.com/?ref_noscript=sobyteme&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;a href=&quot;http://disqus.com&quot; class=&quot;dsq-brlink&quot;&gt;blog comments powered by &lt;span class=&quot;logo-disqus&quot;&gt;Disqus&lt;/span&gt;&lt;/a&gt;
</description>
          <pubDate>Fri, 03 Dec 2010 03:26:54 GMT</pubDate>
          <guid>http://your-web-site.com/news/2010/12/03/rubyprof-oink-and-activerecord-bloat/</guid>
          <link>http://your-web-site.com/news/2010/12/03/rubyprof-oink-and-activerecord-bloat/</link>
        </item>
    
        <item>
          <title>Fun fun fun fun fun</title>
          <description>&lt;h3&gt;Fun fun fun fun fun&lt;/h3&gt;
&lt;div class=&quot;posted&quot;&gt;Posted by Steve on November 24, 2010&lt;em&gt;|&lt;/em&gt;&lt;!--img src=&quot;http://spurrd.com/assets/123/comment.png&quot; /--&gt;&lt;a href=&quot;/news/2010/11/24/fun-fun-fun-fun-fun/#disqus_thread&quot;&gt;Comments&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Say what you like about the tories, they know how to get the kids rioting...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://london.indymedia.org/system/photo/2010/11/24/5157/resize_p241110_14.481000010.jpg&quot;&gt;&lt;img src=&quot;http://london.indymedia.org/system/photo/2010/11/24/5157/resize_p241110_14.481000010-medium.jpg?1290610771&quot; alt=&quot;Resize_p241110_14&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://london.indymedia.org/system/photo/2010/11/24/5158/resize_p241110_14.491000011.jpg&quot;&gt;&lt;img src=&quot;http://london.indymedia.org/system/photo/2010/11/24/5158/resize_p241110_14.491000011-medium.jpg?1290610771&quot; alt=&quot;Resize_p241110_14&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://london.indymedia.org/system/photo/2010/11/24/5159/resize_p241110_14.501000012.jpg&quot;&gt;&lt;img src=&quot;http://london.indymedia.org/system/photo/2010/11/24/5159/resize_p241110_14.501000012-medium.jpg?1290610771&quot; alt=&quot;Resize_p241110_14&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://sobyteme.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;http://disqus.com/?ref_noscript=sobyteme&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;a href=&quot;http://disqus.com&quot; class=&quot;dsq-brlink&quot;&gt;blog comments powered by &lt;span class=&quot;logo-disqus&quot;&gt;Disqus&lt;/span&gt;&lt;/a&gt;
</description>
          <pubDate>Wed, 24 Nov 2010 07:07:25 GMT</pubDate>
          <guid>http://your-web-site.com/news/2010/11/24/fun-fun-fun-fun-fun/</guid>
          <link>http://your-web-site.com/news/2010/11/24/fun-fun-fun-fun-fun/</link>
        </item>
    
        <item>
          <title>Ruby 1.9 String encoding shitfest</title>
          <description>&lt;p&gt;&amp;nbsp;There are countless posts out there, screams in the darkness by developers claiming that &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/padrino/search?group=padrino&amp;amp;q=encoding&amp;amp;qt_g=Search+this+group&quot;&gt;this gem doesn't work with that web framework using Ruby 1.9&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In my case the problematic layers in the technology stack were Padrino 0.9.14 with Sinatra-1.0 and Typhoeus 0.1.31 plus some other String to byte array conversions in our codebase.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Testing had showed that when the app received input containing umlauts and other accented letters (i.e. multi byte characters) it failed. &lt;a target=&quot;_blank&quot; href=&quot;http://blog.grayproductions.net/articles/ruby_19s_string&quot;&gt;There are some lengthy and detailed explanations and discussions about how Ruby 1.8 handles character encoding differently from Ruby 1.9&lt;/a&gt;. The sort of thing I'd hoped I'd never have to read but some times you just have to get informed. Hopefully this article will help shortcut or reiterate some of this info.&lt;/p&gt;
&lt;p&gt;So lets begin with the rendered view of your web app, a couple of things will help ease the pain here.&lt;/p&gt;
&lt;p&gt;First make sure all your pages contain the correct content-type meta tag:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span style=&quot;color: rgb(255, 255, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre; &quot;&gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;meta&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; http-equiv&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&amp;quot;Content-Type&amp;quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;content&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&amp;quot;text/html; charset=UTF-8&amp;quot; &lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&lt;span class=&quot;attribute-name&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Secondly make sure that all your forms use the accept-charset attribute in the html form tag or whatever you use to generate the tag:&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(255, 255, 255); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;lt;form accept-charset=&amp;quot;utf-8&amp;quot;...&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;now we know that the pages can display and post multi byte UTF-8 characters, the web application might be a different story...&lt;/p&gt;
&lt;p&gt;One of the next quick fixes to apply which worked well for me was to apply a filter on all requests which forced the encoding of all incoming String params.&lt;/p&gt;
&lt;p&gt;A branch of&amp;nbsp;&lt;a target=&quot;_blank&quot; href=&quot;http://github.com/rkh/sinatra&quot;&gt;RKH's fork of Sinatra&lt;/a&gt;&amp;nbsp;helped with this, there's a utility method in lib/sinatra/base.rb which does the trick...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#99CC00&quot; face=&quot;'Courier New'&quot;&gt;
&lt;p&gt;if defined? Encoding&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;if Encoding.default_external.to_s =~ /^ASCII/&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Encoding.default_external = &amp;quot;UTF-8&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;end&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;Encoding.default_internal ||= Encoding.default_external&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;def force_encoding(data)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return if data == self&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if data.respond_to? :force_encoding&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;data.force_encoding(Encoding.default_external)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elsif data.respond_to? :each_value&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;data.each_value { |v| force_encoding(v) }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elsif data.respond_to? :each&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;data.each { |v| force_encoding(v) }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;end&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;end&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;def force_encoding(*) end&lt;/p&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;to work with this we need to set some default encodings for our webapp.&lt;/p&gt;
&lt;p&gt;In Padrino this can be done in the &lt;b&gt;app.rb&lt;/b&gt; file:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp;if RUBY_VERSION &amp;lt; '1.9'&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$KCODE = 'u'&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Encoding.default_external = Encoding::UTF_8&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Encoding.default_internal = Encoding::UTF_8&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp;end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if you are a padrino user who doesn't wanna touch the Sinatra gem you can create a general before filter in &lt;b&gt;app.rb&lt;/b&gt; like this&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;before do&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;&amp;nbsp;&amp;nbsp;force_encoding(params)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;there are likely other parts of your application stack that will not be UTF-8 friendly, noteably your tests might complain if you attempt to add multi byte characters to your test data.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Adding the code hint&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(153, 204, 0); &quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;# encoding: utf-8&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;to the first line of the test class files will alleviate this, it's a grubby fix but we live in a world of compromises, what can you do.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://sobyteme.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;http://disqus.com/?ref_noscript=sobyteme&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;a href=&quot;http://disqus.com&quot; class=&quot;dsq-brlink&quot;&gt;blog comments powered by &lt;span class=&quot;logo-disqus&quot;&gt;Disqus&lt;/span&gt;&lt;/a&gt;
&lt;/p&gt;</description>
          <pubDate>Thu, 16 Sep 2010 08:56:32 GMT</pubDate>
          <guid>http://your-web-site.com/news/2010/09/16/ruby-1-9-string-encoding-shitfest/</guid>
          <link>http://your-web-site.com/news/2010/09/16/ruby-1-9-string-encoding-shitfest/</link>
        </item>
    
        <item>
          <title>None Meaner...</title>
          <description>&lt;p&gt;&lt;img src=&quot;http://i1023.photobucket.com/albums/af357/thespacemonkey666/DLH_2010_RIGHT.jpg&quot;/&gt;&lt;/p&gt;
&lt;p&gt;The Flaming Wall of Death...&lt;br/&gt;
&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/E4nRWlAKRAY&amp;hl=en&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/E4nRWlAKRAY&amp;hl=en&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://sobyteme.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;http://disqus.com/?ref_noscript=sobyteme&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;a href=&quot;http://disqus.com&quot; class=&quot;dsq-brlink&quot;&gt;blog comments powered by &lt;span class=&quot;logo-disqus&quot;&gt;Disqus&lt;/span&gt;&lt;/a&gt;
</description>
          <pubDate>Wed, 28 Jul 2010 03:07:18 GMT</pubDate>
          <guid>http://your-web-site.com/news/2010/07/28/none-meaner-/</guid>
          <link>http://your-web-site.com/news/2010/07/28/none-meaner-/</link>
        </item>
    
        <item>
          <title>Brown Sauce for life</title>
          <description>&lt;p&gt;First up install Radiant...&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;gem install radiant&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;and you'll also need the heroku gem...&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;gem install heroku&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;you might need to install a few dependencies for radiant to work notably some cucumber versions won't play ball, mine seemed happy straight off. So create a radiant app...&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;radiant oohsaucy&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;cd oohsaucy&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming you have git installed on your system&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git init&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git add .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git commit -m &amp;quot;The all new Ooh Saucy app&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now time to do some Heroku magic&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;heroku create&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Monaco, monospace; line-height: 20px; white-space: pre; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 'Courier New'; line-height: normal; white-space: normal; &quot;&gt;$&amp;nbsp;&lt;/span&gt;git remote add heroku git@heroku.com:oohsaucy.git&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;so now we have version control hooked up to Heroku's repo we can start developing the app.&lt;/p&gt;
&lt;p&gt;First thing is to configure gems so that when we push to Heroku it knows our app's dependencies...&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;vi .gems&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and add the lines&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;rails -v=2.3.5&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;radiant&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;save the file&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git add .gems&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git commit -m &amp;quot;Gem dependencies for Heroku deployment&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;now do your thing with the application locally and when you are ready to hit the big red launch button...&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;git push heroku master&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and because it's a radiant app we need to bootstrap the production db&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;heroku rake db:create:all&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;heroku rake db:migrate&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$&amp;nbsp;heroku rake production db:bootstrap&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;now you might want to seed a bit of data you set up in development (no doubt some people will frown at this, frown away, this is about expedient development not chin scratching theory).&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: 'Courier New'; &quot;&gt;$ heroku db:push&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;this exports your local db to heroku's production db.&lt;/p&gt;
&lt;p&gt;You're done. Heroku will give you back the url your app is deployed to in the console so you can configure your domain name DNS accordingly.&amp;nbsp;&lt;/p&gt;

&lt;div id=&quot;disqus_thread&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://sobyteme.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;http://disqus.com/?ref_noscript=sobyteme&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;a href=&quot;http://disqus.com&quot; class=&quot;dsq-brlink&quot;&gt;blog comments powered by &lt;span class=&quot;logo-disqus&quot;&gt;Disqus&lt;/span&gt;&lt;/a&gt;
</description>
          <pubDate>Mon, 26 Jul 2010 04:18:27 GMT</pubDate>
          <guid>http://your-web-site.com/news/2010/07/26/brown-sauce-for-life/</guid>
          <link>http://your-web-site.com/news/2010/07/26/brown-sauce-for-life/</link>
        </item>
    
    
  </channel>
</rss>


