<?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>has_many :thoughts: Tag Rails</title>
    <link>http://blog.kineticweb.com/articles/tag/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>RailsConf 2008 - Justin's Schedule</title>
      <description>&lt;p&gt;Below is the schedule I came up with when going over the sessions available this year at RailsConf&amp;#8230; Going to try to make these, if not switch with Colin so we cover the conference well&amp;#8230; very glad to see some advanced classes! Would have loved a &lt;span class="caps"&gt;REAL&lt;/span&gt; advanced Rspec session though.&lt;/p&gt;


	&lt;p&gt;8:30am Thursday, 05/29/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1862"&gt;Meta-programming Ruby for Fun &amp;amp; Profit&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2650"&gt;Neal Ford&lt;/a&gt; (ThoughtWorks), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2751"&gt;Patrick Farley&lt;/a&gt; (ThoughtWorks)
Ruby is the revenge of the Smalltalkers. Not since Smalltalk has a language had such powerful meta-programming facilities. While this may seem like a minor feature, it turns out that surgical meta-programming allows solutions to problems that are clearer, more concise, more maintainable, and take orders of magnitudes fewer lines of code. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1862"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:30pm Thursday, 05/29/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1213"&gt;Powering &lt;span class="caps"&gt;AIR&lt;/span&gt; Applications with Rails&lt;/a&gt;
Portland Ballroom 252
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/467"&gt;Tony Hillerson&lt;/a&gt; (EffectiveUI), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2576"&gt;Daniel Wanja&lt;/a&gt; (Nouvelles Solutions, Inc.)
Adobe&amp;#8217;s &lt;span class="caps"&gt;AIR&lt;/span&gt; platform offers developers familiar with web technology the tools to create desktop applications. Come and learn how to drive an &lt;span class="caps"&gt;HTML&lt;/span&gt; and a Flex &lt;span class="caps"&gt;AIR&lt;/span&gt; application with Rails using RubyAMF. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1213"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2495"&gt;Entrepreneurs On Rails&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/4997"&gt;Dan Benjamin&lt;/a&gt; (Rails Machine)
Many of the people working with Rails are independent developers, doing freelance work or running small development shops. This makes sense &amp;#8211; Rails provides a great framework for an indy developer, making it easy to work with with designers and other developers. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2495"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2043"&gt;Hosting and the Woes&lt;/a&gt;
Portland Ballroom 255&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1583"&gt;Ezra Zygmuntowicz&lt;/a&gt; (EngineYard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2863"&gt;Jamie van Dyke&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2866"&gt;Tom Mornini&lt;/a&gt; (Engine Yard)
What are the day to day issues with Rails hosting. How can they be solved, and what are the best practise methods of avoiding them. Engine Yard have extensive experience with high volume Rails applications and would like to talk about what we&amp;#8217;ve learned and what our customers have learnt. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2043"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1883"&gt;Faster, Better, &lt;span class="caps"&gt;ORM&lt;/span&gt; with DataMapper&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2686"&gt;Yehuda Katz&lt;/a&gt; (EngineYard)
This session will cover using the DataMapper &lt;span class="caps"&gt;ORM&lt;/span&gt; with Ruby on Rails, and go in-depth into its code. It will focus on integration with Ruby on Rails and provide an advanced-level overview of the codebase and design philosophy. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1883"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;2:50pm Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/4342"&gt;Rubinius &amp;#8211; Under the Hood and Behind the Curtain&lt;/a&gt;
&lt;span class="caps"&gt;D135&lt;/span&gt;-136&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/13749"&gt;Evan Phoenix&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/22997"&gt;Brian Ford&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/13767"&gt;Wilson Bilkovich&lt;/a&gt; (Engine Yard)
Rubinius is a virtual machine built from the ground up to provide a robust, high-performance runtime for Ruby code. The Rubinius team is guiding the development of 20,000+ specifications that define the Ruby language. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/4342"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;4:25pm Friday, 05/30/2008&lt;br&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1963"&gt;The Launch: Dos and Don&amp;#8217;ts of Real Life Deploys&lt;/a&gt;
Portland Ballroom 255&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2518"&gt;Chris Wanstrath&lt;/a&gt; (Err Free)
There&amp;#8217;s more to launching an app than &amp;#8220;cap deploy&amp;#8221;&amp;#8212;the process is as much a psychological challenge as a technical one. So, what does it take to launch an app you can depend on and be proud of? With a handful of production launches under his belt, Chris will talk about the big picture and little details of bringing your site to life. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1963"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2042"&gt;Assembling Pages Last: Edge Caching, &lt;span class="caps"&gt;ESI&lt;/span&gt; &amp;amp; Rails&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2594"&gt;Aaron Batalion&lt;/a&gt; (Hungry Machine &lt;span class="caps"&gt;LLC&lt;/span&gt;)
When working on scaling Rails to millions of users/day with complex personalization, caching becomes essential. This talk will cover edge caching, edge side includes (ESI) in Rails, and partial page caching higher in the stack. It will also cover &lt;span class="caps"&gt;ESI&lt;/span&gt; as a fabric for assembling heterogeneous applications into a single, cacheable web experience. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2042"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1755"&gt;Advanced RESTful Rails&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1467"&gt;Ben Scofield&lt;/a&gt; (Viget Labs)
Designing RESTful systems in Rails carries many benefits. It is not a problem-free approach, however; there are accessibility issues with the standard conventions, and some functions are more difficult to map to resources than others. In this session, we&amp;#8217;ll look at solutions for these (and other) problems that arise when you take &lt;span class="caps"&gt;REST&lt;/span&gt; beyond the standard examples. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1755"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2031"&gt;Build Your Own Distributed, Self-Configuring Rails Cluster&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2833"&gt;Dave Fayram&lt;/a&gt; (Powerset, Inc), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2520"&gt;Tom Preston-Werner&lt;/a&gt; (Powerset, Inc.)
Fuzed is a Rails server stack written in Erlang that can replace standard mongrel/reverse proxy architectures. It focuses on reliability and ease of deployment in distributed environments. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2031"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;2:50pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1871"&gt;Custom Nginx Modules: Accelerate Rails, &lt;span class="caps"&gt;HTTP&lt;/span&gt; Tricks&lt;/a&gt;
General Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2451"&gt;Adam Wiggins&lt;/a&gt; (Heroku)
Got a Rails app that needs even more speed? Adam Wiggins of Heroku will show you how to write a custom Nginx module to bring blinding speed to critical code paths (and do &lt;span class="caps"&gt;HTTP&lt;/span&gt; tricks that can&amp;#8217;t be done with Rails and Mongrel alone), using examples from Heroku&amp;#8217;s own authentication module ngx_heroku_gate. Dust off your C compiler and prepare to push the limits of nginx, Rails, and &lt;span class="caps"&gt;HTTP&lt;/span&gt;. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1871"&gt;Read more.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;4:25pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1948"&gt;Metaprogramming and Ruby Internals for Rails Programmers&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2751"&gt;Patrick Farley&lt;/a&gt; (ThoughtWorks)
Rails programmers are Ruby programmers. In this session we&amp;#8217;ll cover some useful Ruby metaprogramming techniques as used in real world Rails applications and extensions. Then we&amp;#8217;ll dig deep into &lt;span class="caps"&gt;MRI&lt;/span&gt; and JRuby source to gain a nuanced understanding of the implementation details of Singletons, Mixins and the Ruby Object model. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1948"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2021"&gt;Scaling Ruby from the Inside Out&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1583"&gt;Ezra Zygmuntowicz&lt;/a&gt; (EngineYard)
This is a talk about what it takes to &lt;strong&gt;really&lt;/strong&gt; scale Ruby applications. We will not only examine all the aspects of hardware and web server configurations, we will also look at scaling the ruby interpreter itself. Including performance quirks of &lt;span class="caps"&gt;MRI&lt;/span&gt; and how Rubinius is set to fix a lot of these problems. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2021"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1945"&gt;Everyday DTrace on &lt;span class="caps"&gt;OSX&lt;/span&gt;: A Guide To Using DTrace for Your Full Application Stack&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2752"&gt;Scott Barron&lt;/a&gt; (EdgeCase), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2696"&gt;Chad Humphries&lt;/a&gt; (EdgeCase)
Have you ever wanted to know why a part of your application is slow? How about how long that query takes? Wouldn&amp;#8217;t it be nice if you could get this type of information for ruby, rails, and the database server in one place? You can now with DTrace on &lt;span class="caps"&gt;OSX 10&lt;/span&gt;.5. We&amp;#8217;ll show you how to best use this tool-chain to debug, profile, and gather more information about your application. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1945"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1935"&gt;Building an app in 48 hours &amp;#8211; A Rails Rumble Case Study&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2321"&gt;Josh Owens&lt;/a&gt; (Intridea, Inc/Web 2.0 Show Podcast), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2024"&gt;Chris Selmer&lt;/a&gt; (Intridea, Inc.)
So you want to build a Rails app quickly? Competitors in the Rails Rumble had 48 hours to design, develop, and deploy a complete application. We&#226;&#8364;&#8482;ll take you through the development processes of the winning four-man Tasty Planner team, and compare it with those of the one-man Your Pet Records team. We&#226;&#8364;&#8482;ll discuss techniques, short-cuts, helpers, and Rails plugins that helped speed development. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1935"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 28 May 2008 20:52:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0ba193b0-24aa-467a-a485-9616d4296435</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2008/05/28/railsconf-2008-justins-schedule</link>
      <category>RailsConf</category>
      <category>Rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Highrise API and tagging</title>
      <description>&lt;p&gt;Like &lt;a href="http://forum.37signals.com/highrise/forums/15/topics/1312"&gt;many&lt;/a&gt;, I was disappointed that the &lt;a href="http://www.highrisehq.com/"&gt;Highrise&lt;/a&gt; &lt;a href="http://developer.37signals.com/highrise/"&gt;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; does not support tagging of people. However, I found a way to easily add the capability to the 37signals-supplied Ruby wrapper class, even if it is unsupported. I added a &lt;code&gt;#tag!&lt;/code&gt; instance method to the Person class and used a call directly to the site, not through the &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;


&lt;pre&gt;
class Person &amp;lt; Subject
  ...
  def tag!(tag_name)
    `curl -s -d 'name=#{tag_name}' #{ENV['HIGHRISE_URL']}parties/#{id}/tags`
  end
end
&lt;/pre&gt;

	&lt;p&gt;The output is a bunch of javascript to update the page to reflect the change, but one can safely ignore this. The tag is added and everything works great. Not sure how well this would work on Windows, as the &lt;code&gt;curl&lt;/code&gt; command-line program is likely unavailable.&lt;/p&gt;


	&lt;p&gt;We use this method in our latest project to add appropriate tags to people as they are created. It helps us segment people added to Highrise for the project from the rest of our contacts in Highrise.&lt;/p&gt;</description>
      <pubDate>Mon, 18 Feb 2008 13:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8162daad-bcb1-4b7f-a3df-e1c8c8a840e0</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/18/highrise-api-and-tagging</link>
      <category>highrise</category>
      <category>ruby</category>
      <category>Rails</category>
      <category>37signals</category>
    </item>
    <item>
      <title>Capistrano Twitter task</title>
      <description>&lt;p&gt;Justin had an idea that we should post to &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; whenever we deploy a new version of our apps to either a staging site or the production app. Turns out, this is really easy with the &lt;a href="http://twitter4r.rubyforge.org/"&gt;twitter4r gem&lt;/a&gt;. I used a twitter account that Justin created expressly for our internal notices and set its updates to be private. Then I created this task:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;desc&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;posts to twitter that something was deployed&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="ident"&gt;task&lt;/span&gt; &lt;span class="symbol"&gt;:send_tweet&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;rubygems&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter4r&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter/console&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;twitter&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Twitter&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Client&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;from_config&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;config/twitter.yml&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;&lt;span class="ident"&gt;rails_env&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;status&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;status&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:post&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;deployed &lt;span class="expr"&gt;#{application}&lt;/span&gt; to &lt;span class="expr"&gt;#{rails_env}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The twitter4r library loads a simple yaml file that contains the username and password of the twitter account to use. And one line of code posts the status update with the name of the app and the environment from previously-defined variables.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it! The great thing about using Twitter for this, as Justin pointed out, is that each one of us developers can consume this information how we choose: IM, Growl messages with &lt;a href="http://iconfactory.com/software/twitterrific"&gt;Twitterific&lt;/a&gt;, &lt;span class="caps"&gt;SMS&lt;/span&gt;, etc. So it&amp;#8217;s really just the syndication technology that we&amp;#8217;re taking advantage of.&lt;/p&gt;


	&lt;h2&gt;Update&lt;/h2&gt;


	&lt;p&gt;Chris&amp;#8217;s comment below prompted me to come up with a &lt;a href="http://blog.kineticweb.com/articles/2008/02/16/capistrano-twitter-task-take-2"&gt;new version&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 10 Feb 2008 10:37:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c9889033-88a8-4c6a-a2cb-23b2bf7694c5</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/10/capistrano-twitter-task</link>
      <category>capistrano</category>
      <category>ruby</category>
      <category>twitter</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Voicemail integration with Highrise</title>
      <description>&lt;p&gt;I&amp;#8217;ve often had trouble keeping track of my voicemail messages. Even though they get emailed to me, the emails don&amp;#8217;t have any info about who the messages are from and I have no way of keeping track of if I&amp;#8217;ve responded or if there&amp;#8217;s an action item.&lt;/p&gt;


	&lt;p&gt;So I wrote a simple little Rails app to help me integrate my voicemail message into Highrise, the 37signals product which I&amp;#8217;ve been trying, and liking, in recent weeks. Their provided &lt;span class="caps"&gt;REST&lt;/span&gt; web service &lt;span class="caps"&gt;API&lt;/span&gt; and accompanying Ruby wrapper made the whole thing way too easy. I have two models:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Person&lt;/li&gt;
		&lt;li&gt;Voicemail&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The Person model holds a cached list of the names and Highrise ID&amp;#8217;s of the people in my Highrise account. I can update this through a simple link in the app anytime I need.&lt;/p&gt;


	&lt;p&gt;The voicemails get into the app by a simple little &amp;#8220;pipe to program&amp;#8221; I added on the mail server. Something like this:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;curl -u username:password --data-binary @- http://address.of.app/import&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;When an email message is received at the voicemail alias, the entire email is POSTed to the address above where it&amp;#8217;s consumed with a tiny controller action like like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;Voicemail.import(request.raw_post)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The &amp;#8216;import&amp;#8217; class method simply uses TMail to parse the message, pull off the attached &lt;span class="caps"&gt;WAV&lt;/span&gt; file, save it to the file system, and create a new Voicemail record.&lt;/p&gt;


	&lt;p&gt;The rest of the interface is simple &lt;span class="caps"&gt;CRUD&lt;/span&gt; stuff: A list of new voicemails that have come in with a link to delete and a link to save for each one. When I &amp;#8216;save&amp;#8217; it, I choose a Person from a drop down of all my Highrise contacts and enter a very short 1 line description of what they called about. A note is instantly posted to the Person&amp;#8217;s Highrise history with the time of the voicemail, the 1-line description, and a link to listen to the voicemail. If 37signals provided file upload capability through the &lt;span class="caps"&gt;API&lt;/span&gt;, I might just upload the file to Highrise. Or I might not since the &lt;span class="caps"&gt;WAV&lt;/span&gt;&amp;#8217;s would eat up my storage space.&lt;/p&gt;


	&lt;p&gt;I hope to expand this a bit in the near future with a nice interface&amp;#8212;perhaps autocomplete instead of a drop down for choosing the Person. And I think I&amp;#8217;ll add a way to optionally create a Task in Highrise related to the Note. It would be nice if Highrise color-coded the categories applied to tasks; that way, I could categorize all the voicemail follow-up tasks and color code them so they stood out in my task list. I&amp;#8217;ll have to submit that as a feature request.&lt;/p&gt;


	&lt;h2&gt;Update&lt;/h2&gt;


	&lt;p&gt;Here&amp;#8217;s a screenshot, per Jason&amp;#8217;s request. Click for a full sized version. As you can see, the interface is very modest.
&lt;a href="http://blog.kineticweb.com/files/voicemails_screenshot.png"&gt;&lt;img src="http://blog.kineticweb.com/files/voicemails_screenshot_sm.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


Since the original posting, I changed a couple things:
	&lt;ul&gt;
	&lt;li&gt;I&amp;#8217;ve linked the person&amp;#8217;s name to their Highrise page&lt;/li&gt;
		&lt;li&gt;The little note icon on the left takes you to the note in Highrise that was created for this voicemail&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Fri, 01 Feb 2008 07:23:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2820418f-8e1b-4e95-b021-a101549ef745</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/01/voicemail-integration-with-highrise</link>
      <category>Rails</category>
      <category>highrise</category>
      <category>37signals</category>
    </item>
    <item>
      <title>rfacebook isn't Rails 2.0 compatible</title>
      <description>&lt;p&gt;I started messing around with Facebook app development today just for fun. Since Rails 2.0 is out, I figured I&amp;#8217;d use it. However, I quickly discovered the rfacebook gem is not Rails 2.0 compatbile. It&amp;#8217;s still using the old &lt;code&gt;render_text&lt;/code&gt; method which is now replaced with &lt;code&gt;render(:text =&amp;gt; "")&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;So for now, I just added this to my application.rb:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;  def render_text(text)
    render(:text =&amp;gt; text)
  end&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Which seems to get me up and running. But who knows how many other little issues like this there are. Perhaps I should switch the app back to the previous Rails version? Or maybe I&amp;#8217;ll just push forward and submit patches to rfacebook for these.&lt;/p&gt;</description>
      <pubDate>Sat, 08 Dec 2007 14:24:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1ec76c56-98d3-405a-8cfc-341ecbccaef0</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/12/08/rfacebook-isnt-rails-2-0-compatible</link>
      <category>Facebook</category>
      <category>Rails2.0</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Rails 2.0 is here</title>
      <description>&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;# gem update rails --include-dependencies
Updating installed gems...
Attempting remote update of rails
Successfully installed rails-2.0.1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Sweet! The time has come. There goes another weekend buried in geekery. I&amp;#8217;m going to spend some time going through the PeepCode Rails 2.0 &lt;span class="caps"&gt;PDF&lt;/span&gt; and playing around with ideas for a couple apps I&amp;#8217;m doodling with.&lt;/p&gt;</description>
      <pubDate>Fri, 07 Dec 2007 21:27:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:0a737011-280c-438f-8676-ec40d9f2c5ce</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/12/07/rails-2-0-is-here</link>
      <category>Rails</category>
    </item>
    <item>
      <title>Kinetic's Intro to Ruby-Debugging</title>
      <description>&lt;p&gt;Galvanize your debugging skills, Rails 2.0 cometh. With its optimized breakpointing we will all soon find ourselves wanting to be thrown into the console. If your up to it that is, and consoles don&amp;#8217;t scare you. This quickie guidebook demonstrates some current features of the &amp;#8216;ruby-debug&amp;#8217; gem and how you can start getting into the mindset of live debugging your Rails code.&lt;/p&gt;


	&lt;p&gt;At the conclusion of this article I will provide several useful links for other resources into Ruby-debug.&lt;/p&gt;


	&lt;p&gt;&lt;sub&gt;Warning: This stuff tends to be only for real Ruby hackers that like to follow live execution of their applications and frameworks, demystifying the magical and generally understanding exactly whats going on during execution.&lt;/sub&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Get the Goods&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Start-up your terminal of choice and do the old&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;# sudo gem install ruby-debug -y&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You&amp;#8217;ll of course want to choose either Win32 or the more fashionable Ruby version, depending on your platform.&lt;/p&gt;


	&lt;p&gt;You may also want to install Wirble. Wirble gives you helpful &lt;span class="caps"&gt;IRB&lt;/span&gt; syntax highlighting which can come into so much handiness that you might just pee your pants.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;# sudo gem install wirble&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
...for wet pants.

	&lt;p&gt;Next, visit our old friend &amp;#8216;development.rb&amp;#8217; and add the following line at the bottom of this file&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;# require 'ruby-debug'&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;If your using the current Edge Rails, 2.0 &lt;span class="caps"&gt;RC1&lt;/span&gt;, you should not need to do any of this as the new version of Rails will be using this by default. This is from my own hear-say, so I&amp;#8217;ve installed it anyway, and using it in Rails 1.2.5 as well.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;The Pay Dirt&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Fire up your Rails application in your terminal, head over to a controller and add the following line as the first call in any action. Preferrably one with some instance variable assignments like a &lt;span class="caps"&gt;POST&lt;/span&gt;/UPDATE&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;debugger&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;sub&gt;You can place this where ever you like when debugging this way, but for the article you might find my controller placement idea good for your first use (where the &lt;span class="caps"&gt;ACTION&lt;/span&gt; is).&lt;/sub&gt;&lt;/p&gt;


	&lt;p&gt;Your going to now navigate to this action from within your web browser. Your browser should stall (what looks to be a stall), and your browser may be still be trying to load the page. Apple-Tab over to your Terminal, where you ran script/server, and you should see&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;./script/..config/../app/controllers/pirates_controller.rb:8 @pirate = Pirate.find(params[:id]) if params[:treasure]
(rdb:1)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Take notice to the first line will be the last line executed before hitting your &amp;#8216;debugger&amp;#8217; line. As well as your new friend, the ruby-debug prompt.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Help&lt;/strong&gt;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;(rdb:1) help
ruby-debug help v0.9.3
Type 'help &amp;lt;command-name&amp;gt;' for help on a specific command

Available commands:
backtrace break catch cont delete display down eval exit finish frame 
help irb list method next p pp quit reload restart save script set 
step thread tmate trace undisplay up var where 

(rdb:1) help var
ruby-debug help v0.9.3
v[ar] c[onst] &amp;lt;object&amp;gt;          show constants of object
v[ar] g[lobal]                  show global variables
v[ar] i[nstance] &amp;lt;object&amp;gt;       show instance variables of object
v[ar] l[ocal]                   show local variables&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;strong&gt;List and Where&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Now try &amp;#8220;list&amp;#8221;ing out your source, and finding out &amp;#8220;where&amp;#8221; you are in a stack trace (if this was an error we&amp;#8217;d 
see a nice long trace).&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;(rdb:1) list =
    5            def ensure_booty
    6                debugger
=&amp;gt;    8                @pirate = Pirate.find(params[:id]) if params[:treasure]
    9                if @pirate.update_attributes(:booty =&amp;gt; params[:treasure])
    10                    redirect_to :action =&amp;gt; :set_sail
    11                else
    12                    redirect_back_or_default(raid_island_path)
    13                end
    14            end
(rdb:1) where
--&amp;gt; #0 /Users/padiomonk/rails/piratr/app/controllers/pirates_controller.rb:8 in 'ensure_booty'&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You can list as many times as you want to follow down your source. Using the &amp;#8221;=&amp;#8221; symbol will always return you to where you are in the current source.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Next and Step&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;You can use the &amp;#8220;step&amp;#8221; command to make a single step, while the &amp;#8220;next&amp;#8221; command will move you to the next line of execution without descending inside methods (I haven&amp;#8217;t gotten the full hang of this yet).&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;(rdb:1) next
Processing PiratesController#ensure_booty (for 127.0.0.1 at 1505-11-15 23:38:35) [GET]
  Session ID: 03411cca0de2164ecb751116ae19d948
  Parameters: {&amp;quot;action&amp;quot;=&amp;gt;&amp;quot;ensure_booty&amp;quot;, &amp;quot;controller&amp;quot;=&amp;gt;&amp;quot;pirate&amp;quot;, &amp;quot;id&amp;quot; =&amp;gt; &amp;quot;23&amp;quot;, &amp;quot;treasure&amp;quot; =&amp;gt; &amp;quot;women's panties&amp;quot;}
  SQL (0.000214)   SET SQL_AUTO_IS_NULL=0
  Pirate Columns (0.004699)   SHOW FIELDS FROM pirates
  Pirate Load (0.001597)   SELECT * FROM pirate WHERE (pirates.`id` = 23) LIMIT 1
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/base.rb:1102 render unless performed?&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;strong&gt;Break and Continue&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Breakpoints are instances where you are thrown back into your debugger when a certain method is called, a certain line is reached or a certain condition occurs. Mostly a fine-art of development, good breakpointing skills can definitely take a while to grow into your personal development cycle.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;(rdb:1) b 9
Set breakpoint 1 at ./script/.../controllers/pirates_controller.rb:9
(rdb:1) b Booty.find
Set breakpoint 2 at Booty.find
(rdb:1) b 12 if params[:treasure].nil?
Set breakpoint 3 at 12
(rdb:1) b
Breakpoints:
    1 pirates_controller.rb:9
    2 Booty.find
    3 pirates_controller.rb:12 if params[:treasure].nil?
(rdb:1) cont&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You will now be thrown back into the debugger when any of these breakpoints are &amp;#8220;met&amp;#8221;. Taking a look up above, this &lt;em&gt;should&lt;/em&gt; throw us right at the redirect_back_or_default if I&amp;#8217;m correct.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;RDebug&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Now that you know some about breakpoints, you might find the time where you just want to load up the debugger before running Rails&amp;#8230; set some
breakpoints in places you already know of, or need to investigate&amp;#8230; then run your script/server. Without placing a &amp;#8220;debugger&amp;#8221; call anywhere.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;# rdebug script/server&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;strong&gt;Open With Your Mate&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Something that I caught onto very quickly, was the ability to open up the current file into TextMate at any time. This comes in handy when exploring the Rails source, being swung into one file after another.&lt;/p&gt;


	&lt;p&gt;Simply use the &amp;#8220;tmate&amp;#8221; command!&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;IRB&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;The great thing about ruby-debug is that it gives you the current state of your app loaded into an irb session to mess around with. Sometimes I tend to use this more, to checkout my constants and instance variables&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;(rdb:73) irb
&amp;gt;&amp;gt; self.class
=&amp;gt; PirateController
&amp;gt;&amp;gt; instance_variables
=&amp;gt; [&amp;quot;@response&amp;quot;, &amp;quot;@assigns&amp;quot;, &amp;quot;@template&amp;quot;, &amp;quot;@_session&amp;quot;, &amp;quot;@params&amp;quot;, &amp;quot;@_request&amp;quot;, &amp;quot;@pirate&amp;quot;, &amp;quot;@before_filter_chain_aborted&amp;quot;, &amp;quot;@headers&amp;quot;, &amp;quot;@flash&amp;quot;, &amp;quot;@cookies&amp;quot;, &amp;quot;@_response&amp;quot;, &amp;quot;@request_origin&amp;quot;, &amp;quot;@variables_added&amp;quot;, &amp;quot;@_flash&amp;quot;, &amp;quot;@action_name&amp;quot;, &amp;quot;@session&amp;quot;, &amp;quot;@_cookies&amp;quot;, &amp;quot;@performed_redirect&amp;quot;, &amp;quot;@sailboat&amp;quot;, &amp;quot;@_headers&amp;quot;, &amp;quot;@current_user&amp;quot;, &amp;quot;@url&amp;quot;, &amp;quot;@request&amp;quot;, &amp;quot;@_params&amp;quot;, &amp;quot;@performed_render&amp;quot;]
&amp;gt;&amp;gt; @pirate.is_a?(Person)
=&amp;gt; true
&amp;gt;&amp;gt; quit
(rdb:73)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;strong&gt;Outro&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;This tool might not be for you, but I&amp;#8217;ve been learning more and more as I use this. I also don&amp;#8217;t feel there is a better development utility if you intend to truly understand the under pinnings of the Rails source and wield its magical Ruby wisdom (pppfffffttt).&lt;/p&gt;


	&lt;p&gt;Anyway, here&amp;#8217;s are a couple links for more information&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.datanoise.com/ruby-debug/"&gt;Datanoise: Ruby-debug homepage&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.datanoise.com/articles/2006/9/15/debugging-rails-application"&gt;Datanoise: Debugging in Rails&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://datanoise.com/articles/2006/7/12/tutorial-on-ruby-debug" title="helped me with this one"&gt;Datanoise: Tutorial on Ruby-debug&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://brian.maybeyoureinsane.net/blog/2007/05/07/ruby-debug-basics-screencast/"&gt;Misc Praise with Link to Railscast video&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Nov 2007 22:35:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6b9060f6-ebb0-4706-8052-316de25748ad</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2007/11/15/kinetics-intro-to-ruby-debugging</link>
      <category>debugging</category>
      <category>ruby</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Leopard Day, the Ruby on Rails way...</title>
      <description>&lt;p&gt;Since everyone around here thinks I&amp;#8217;m a huge, obnoxious Apple fanboy (and they&amp;#8217;re all so completely right about everything&amp;#8230;) I thought I&amp;#8217;d simply share this link to a great wiki article on the new Rails/Ruby installation in Leopard (thanks Randy). Enjoy, and hope you get your free t-shirt!&lt;/p&gt;


	&lt;p&gt;&amp;#8220;&lt;em&gt;Now that Leopard, the next release of Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;, is available to everyone, you may wonder what changed from the Ruby developer&amp;#8217;s perspective.&lt;/em&gt;&amp;#8220;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://trac.macosforge.org/projects/ruby/wiki/WhatsNewInLeopard"&gt;What&amp;#8217;s New in Leopard? Ruby/Rails&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 26 Oct 2007 09:40:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:08da412d-a019-4c98-88e1-5b94f5541c97</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2007/10/26/leopard-day-the-ruby-on-rails-way</link>
      <category>OSX</category>
      <category>leopard</category>
      <category>ruby</category>
      <category>Rails</category>
      <trackback:ping>http://blog.kineticweb.com/articles/trackback/72</trackback:ping>
    </item>
  </channel>
</rss>
