<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Talk Like A Duck: Tag rails</title>
    <link>http://talklikeaduck.denhaven2.com/articles/tag/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In Ruby, it's not the dog, it's the tricks!</description>
    <item>
      <title>Rails rake_freeze_other_gems</title>
      <description>I&amp;#8217;m working on a team rails project and adding some timezone support.  I installed the tzinfo gem and, since I want to make sure that it gets to the production server, I used the freeze_other_gems&lt;/a&gt; rake task, which I&amp;#8217;d found by doing a rake -T.
&lt;p&gt;I&amp;#8217;d never used it before so I googled to find &lt;a href="http://nubyonrails.com/articles/freeze-other-gems-to-rails-lib-directory"&gt;some documentation&lt;/a&gt;.
It wasn&amp;#8217;t exactly clear, but it turns out that you need to edit the fourth line of the lib/tasks/gems.rake file
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;libraries = %w(progressbar tzinfo)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The progressbar gem was already there so I added tzinfo.&lt;/p&gt;
&lt;p&gt;Then I invoked:&lt;/p&gt;
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ rake freeze_other_gems&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Only to get the error:&lt;/p&gt;
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;rake aborted! undefined method `version&#8217; for nil:NilClass&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This problem had been seen by others and commented on.  I guessed that the problem was not with my newly added gem, but the progressbar gem which was already listed, apparently by one of the other developers.&lt;/p&gt;
&lt;h2&gt;The Quick Fix&lt;/h2&gt;
The first step was to determine the version of the progressbar gem.  I looked at lib where it had been installed, and found that it was version 0.3.  I then installed the gem, and reran the freeze_other_gems rake task.
&lt;p&gt;Success&lt;/p&gt;</description>
      <pubDate>Mon, 02 Jul 2007 11:36:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0834c8f1-be40-4b93-8aa4-6af82d2a1b77</guid>
      <author>Rick DeNatale</author>
      <link>http://talklikeaduck.denhaven2.com/articles/2007/07/02/rails-rake_freeze_other_gems</link>
      <category>rails</category>
      <category>rake</category>
      <category>rails</category>
      <category>gems</category>
      <trackback:ping>http://talklikeaduck.denhaven2.com/articles/trackback/439</trackback:ping>
    </item>
    <item>
      <title>Good News</title>
      <description>Recently  on gluttonous, Kevin Clark announced that &lt;a href="http://glu.ttono.us/articles/2007/06/21/powerset-to-launch-front-end-on-ruby"&gt;
Powerset is going to launch their front-end on Ruby.&lt;/a&gt; It seems that they were already pre-disposed to a major ruby comitment having built a sizable Ruby talent pool for their internal applications.
&lt;p&gt;Prior to making the final decision to go all out with ruby for their front-end launch, the did some due diligence which included investigating the facts behind the recent furore caused by an &lt;a href="Twitter&#8217;s lead developer, Blaine Cook,"&gt;interview&lt;/a&gt; with one of Twitter&amp;#8217;s developers.&lt;/p&gt;
&lt;p&gt;So they went to 
Twitter&#8217;s lead developer, &lt;a href="http://www.slideshare.net/Blaine/scaling-twitter"&gt;Blaine Cook&lt;/a&gt; to get the straight dope.&lt;/p&gt;&lt;p&gt;Quoting Kevin:
&lt;blockquote&gt;The simple fact is that Ruby wasn&#8217;t the source of Twitter&#8217;s woes. As it often happens with rapidly growing sites, they ran into architectural problems. Some design decisions don&#8217;t hurt until they reach a massive scale and at that point you have to rethink your approach. In an email he writes:
&lt;blockquote&gt;
    For us, it&#8217;s really about scaling horizontally &amp;#8211; to that end, Rails and Ruby haven&#8217;t been stumbling blocks, compared to any other language or framework. The performance boosts associated with a &#8220;faster&#8221; language would give us a 10-20% improvement, but thanks to architectural changes that Ruby and Rails happily accommodated, Twitter is 10000% faster than it was in January
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;That last sounds quite true and corresponds to my experiences in the past with Smalltalk.  I used to tell &lt;span class="caps"&gt;IBM&lt;/span&gt; customers that almost all performance comes not from the language but from application design, and that using a dynamic language which allowed the application to be developed in what&amp;#8217;s now called an agile development process allows major performance gains through refining, refactoring, and retuning the system as both business and performance requirements get uncovered/discovered.&lt;/p&gt;&lt;p&gt;
That&amp;#8217;s as least as true of Ruby as it was of Smalltalk 15-20 years ago.&lt;/p&gt;</description>
      <pubDate>Fri, 22 Jun 2007 10:29:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:26814954-7ba2-4b21-bb89-8ed609dacb89</guid>
      <author>Rick DeNatale</author>
      <link>http://talklikeaduck.denhaven2.com/articles/2007/06/22/good-news</link>
      <category>ruby</category>
      <category>war_stories</category>
      <category>best_practices</category>
      <category>performance</category>
      <category>evangelism</category>
      <category>rails</category>
      <trackback:ping>http://talklikeaduck.denhaven2.com/articles/trackback/435</trackback:ping>
    </item>
  </channel>
</rss>
