<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title>knock.on_wood</title>
  <subtitle>unclear thoughts on software development</subtitle>
  <link href="http://blog.ryanwood.com/" />
  <updated>2010-03-14T12:09:13-05:00</updated>
  <author>
    <name>Ryan Wood</name>
  </author>
  <id>http://blog.ryanwood.com/</id>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ryanwood" /><feedburner:info uri="ryanwood" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry>
    <title>Git Workflow: Merge or Rebase</title>
    <link href="http://blog.ryanwood.com/past/2010/3/14/git-workflow-merge-or-rebase/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/3/14/git-workflow-merge-or-rebase/</id>
    <published>2010-03-14T12:09:13-05:00</published>
    <updated>2010-03-14T12:09:13-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;One of the things that I&amp;#8217;m passionate about is the development process. So much of the battle is won or lost by the type of development process you have. Leaning on a &lt;a href='http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html'&gt;couple&lt;/a&gt; &lt;a href='http://nvie.com/archives/323'&gt;smart&lt;/a&gt; guys, I&amp;#8217;ve established a very clean workflow in git. If you haven&amp;#8217;t read these posts, please do so before continuing. Both are excellent and will help clarify my question.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;One of the things that I&amp;#8217;m passionate about is the development process. So much of the battle is won or lost by the type of development process you have. Leaning on a &lt;a href='http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html'&gt;couple&lt;/a&gt; &lt;a href='http://nvie.com/archives/323'&gt;smart&lt;/a&gt; guys, I&amp;#8217;ve established a very clean workflow in git. If you haven&amp;#8217;t read these posts, please do so before continuing. Both are excellent and will help clarify my question.&lt;/p&gt;

&lt;p&gt;The only discrepancy between them is how to handle feature branches. Should you interactively rebase (&lt;code&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;rebase&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;i&lt;/span&gt;&lt;/code&gt;) your feature branch to one commit (or possibly a couple)? &lt;a href='http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html'&gt;Rein&lt;/a&gt; takes this approach. &lt;a href='http://nvie.com/archives/323'&gt;Vincent&lt;/a&gt; on the other hand prefers to leave the feature branch intact and do a non-fast forward merge (&lt;code&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;merge&lt;/span&gt; &lt;span class="punct"&gt;--&lt;/span&gt;&lt;span class="ident"&gt;no&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;ff&lt;/span&gt; &lt;span class="ident"&gt;feature&lt;/span&gt;&lt;/code&gt;) to merge the feature back into the develop branch.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve tried it both ways. Neither is right or wrong and both have their advantages.&lt;/p&gt;

&lt;p&gt;Both go into the develop branch as a single commit, one as a normal commit and one as a merge commit. With the interactive rebase, you lose the granular commit history and potentially have a significantly larger commit. But you have a clear comment (with summary bullets if you follow Rein&amp;#8217;s suggestion) as to what the commit it.&lt;/p&gt;

&lt;p&gt;With a forced merge commit, you maintain the feature branch history which is nice to track down where some error entered the code, but the merge commit is auto-commented with something like &amp;#8217;&lt;code&gt;&lt;span class="constant"&gt;Merge&lt;/span&gt; &lt;span class="ident"&gt;branch&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;feature-x&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&amp;#8217;. It&amp;#8217;s less clear when looking down the commit list of develop what is represented. Another downside of this approach is that you create a lot of unnecessary merge commits in the tree.&lt;/p&gt;

&lt;p&gt;At this point, I think I lean more toward the interactive rebase over the merge, but I&amp;#8217;m still not thoroughly convince. Have an opinion, please let me know in the comments.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Webbynode Review</title>
    <link href="http://blog.ryanwood.com/past/2010/3/1/webbynode-review/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/3/1/webbynode-review/</id>
    <published>2010-03-01T08:04:57-05:00</published>
    <updated>2010-03-01T08:04:57-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;For the past few years, I&amp;#8217;ve used &lt;a href='http://www.slicehost.com'&gt;Slicehost&lt;/a&gt; for all my production hosting needs. I have been very happy with them. Recently I had a need for a new staging server. It takes a good amount of time to set up a site from scratch on Slicehost, which is fine for produciton servers, but I needed a site up quickly.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;For the past few years, I&amp;#8217;ve used &lt;a href='http://www.slicehost.com'&gt;Slicehost&lt;/a&gt; for all my production hosting needs. I have been very happy with them. Recently I had a need for a new staging server. It takes a good amount of time to set up a site from scratch on Slicehost, which is fine for produciton servers, but I needed a site up quickly.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve been using &lt;a href='http://heroku.com'&gt;Heroku&amp;#8217;s incredible service&lt;/a&gt; recently for staging sites. This site however had a ton of uploaded images and I really did want to go through the hassle of setting up S3 for use with Heroku. So I started looking for other options and found &lt;a href='http://webbynode.com'&gt;Webbynode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Their &lt;a href='http://webbynode.com/features'&gt;ReadyStack&lt;/a&gt; concept made it really easy to get a VPS server up and running quickly, yet you still have full access to the server as root (same as Slicehost). Their web user interface was clean and enjoyable to use. For my situation, it was the best of both worlds. I wasn&amp;#8217;t limited by a read-only file system like Heroku and didn&amp;#8217;t take nearly the time to set up and configure as Slicehost.&lt;/p&gt;

&lt;p&gt;I ran into one bug where you couldn&amp;#8217;t use certain special characters in your root password, but got a prompt reply that they would look into it. Overall, I was very pleased. Good work guys.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fat Free CRM on Heroku</title>
    <link href="http://blog.ryanwood.com/past/2010/1/21/fat-free-crm-on-heroku/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/1/21/fat-free-crm-on-heroku/</id>
    <published>2010-01-21T23:34:00-05:00</published>
    <updated>2010-01-21T23:34:00-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;I created a &lt;a href='http://github.com/ryanwood/fat_free_crm'&gt;fork on github&lt;/a&gt; to ease deployment of &lt;a href='http://www.fatfreecrm.com/'&gt;Fat Free CRM&lt;/a&gt; to &lt;a href='http://heroku.com/'&gt;Heroku&lt;/a&gt;. I found this &lt;a href='http://saturnflyer.com/blog/jim/2009/09/08/fat-free-crm-on-heroku/'&gt;great post&lt;/a&gt; about doing this very thing, but I wanted something a little simpler.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I created a &lt;a href='http://github.com/ryanwood/fat_free_crm'&gt;fork on github&lt;/a&gt; to ease deployment of &lt;a href='http://www.fatfreecrm.com/'&gt;Fat Free CRM&lt;/a&gt; to &lt;a href='http://heroku.com/'&gt;Heroku&lt;/a&gt;. I found this &lt;a href='http://saturnflyer.com/blog/jim/2009/09/08/fat-free-crm-on-heroku/'&gt;great post&lt;/a&gt; about doing this very thing, but I wanted something a little simpler.&lt;/p&gt;

&lt;p&gt;For the impatient, here&amp;#8217;s the quick Heroku install:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;clone&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;:/&lt;/span&gt;&lt;span class="regex"&gt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;github&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;ryanwood&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;fat_free_crm&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt;
&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;create&lt;/span&gt;
&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;push&lt;/span&gt; &lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;master&lt;/span&gt;
&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;rake&lt;/span&gt; &lt;span class="ident"&gt;crm&lt;/span&gt;&lt;span class="symbol"&gt;:setup&lt;/span&gt; &lt;span class="constant"&gt;USERNAME&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;myusername&lt;/span&gt; &lt;span class="constant"&gt;PASSWORD&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;mypass&lt;/span&gt; &lt;span class="constant"&gt;EMAIL&lt;/span&gt;&lt;span class="punct"&gt;=&lt;/span&gt;&lt;span class="ident"&gt;my&lt;/span&gt;&lt;span class="attribute"&gt;@email&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Essentially, all I&amp;#8217;ve done in this fork (as of this writing) is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Remove all of the stylesheet and javascript caching directives&lt;/li&gt;

&lt;li&gt;Fix a minor issue in the &lt;code&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;ru&lt;/span&gt;&lt;/code&gt; file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can always check it out &lt;a href='http://wiki.github.com/ryanwood/fat_free_crm/installation-on-heroku'&gt;at the wiki&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Bye bye Vlad</title>
    <link href="http://blog.ryanwood.com/past/2010/1/21/bye-bye-vlad/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/1/21/bye-bye-vlad/</id>
    <published>2010-01-21T23:23:00-05:00</published>
    <updated>2010-01-21T23:23:00-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;I was initially enamored with the &lt;a href='http://www.capify.org'&gt;capistrano&lt;/a&gt; like features, yet simplicity of &lt;a href='http://rubyhitsquad.com/Vlad_the_Deployer.html'&gt;Vlad the Deployer&lt;/a&gt;. I spent 2 days getting the &amp;#8220;simplifed deploy&amp;#8221; working. Well, I thought it was anyway. Turns out that it wasn&amp;#8217;t deploying the correct version from git.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I was initially enamored with the &lt;a href='http://www.capify.org'&gt;capistrano&lt;/a&gt; like features, yet simplicity of &lt;a href='http://rubyhitsquad.com/Vlad_the_Deployer.html'&gt;Vlad the Deployer&lt;/a&gt;. I spent 2 days getting the &amp;#8220;simplifed deploy&amp;#8221; working. Well, I thought it was anyway. Turns out that it wasn&amp;#8217;t deploying the correct version from git.&lt;/p&gt;

&lt;p&gt;I found a &lt;a href='http://github.com/jbarnette/vlad-git/issues#issue/1'&gt;bug in Vlad&lt;/a&gt; which was fixed in master, but wasn&amp;#8217;t in the gem. Then I found another bug in the &lt;a href='http://github.com/jbarnette/vlad-git'&gt;vlad-git&lt;/a&gt;. It turns out &lt;a href='http://github.com/ktheory/'&gt;ktheory&lt;/a&gt; had forks of each with the bugs fixed, but with different gems. I tried to use those, but still wasn&amp;#8217;t getting the expected results.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is simplicity?!?!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I never had any issue with &lt;a href='http://www.capify.org'&gt;capistrano&lt;/a&gt;. So I went back to old faithful. In 10 minutes, I was back to the beauty that is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;cap&lt;/span&gt; &lt;span class="ident"&gt;deploy&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here are a coupleparting thoughts on Vlad:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I understand why they broke out all the plugins, but it was a hassle to deal with&lt;/li&gt;

&lt;li&gt;There was virtually no feedback as to what Vlad was doing during a deploy. I much prefer capistrano&amp;#8217;s output on deploy.&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <title>Ubuntu Hardy LTS Slice with Nginx, Passenger, Git, Vlad and more!</title>
    <link href="http://blog.ryanwood.com/past/2010/1/15/ubuntu-hardy-lts-slice-with-nginx-passenger-git-vlad-and-more/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/1/15/ubuntu-hardy-lts-slice-with-nginx-passenger-git-vlad-and-more/</id>
    <published>2010-01-15T23:41:00-05:00</published>
    <updated>2010-01-15T23:41:00-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;I finally did it. I took notes as I built a server and am posting it (mainly so I don&amp;#8217;t forget). In case someone wants to print this, I left most of the URLs in text so you&amp;#8217;d be able to read them. So here it goes.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I finally did it. I took notes as I built a server and am posting it (mainly so I don&amp;#8217;t forget). In case someone wants to print this, I left most of the URLs in text so you&amp;#8217;d be able to read them. So here it goes.&lt;/p&gt;

&lt;p&gt;I am doing this on &lt;a href='http://slicehost.com'&gt;Slicehost&lt;/a&gt; and decided to user Ubuntu Hardy 8.04.2 as the OS maily for the long term support.&lt;/p&gt;

&lt;h1 id='core_setup'&gt;Core Setup&lt;/h1&gt;

&lt;h2 id='initial_config'&gt;Initial Config&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1'&gt;http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1&lt;/a&gt; &lt;a href='http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-2'&gt;http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-2&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='ruby_enterprise_edition_nginx_passenger'&gt;Ruby Enterprise Edition, Nginx, Passenger&lt;/h2&gt;

&lt;p&gt;I followed this great guide:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://antoniocangiano.com/2009/11/20/setup-ruby-enterprise-edition-nginx-and-passenger-aka-mod_rails-on-ubuntu/'&gt;http://antoniocangiano.com/2009/11/20/setup-ruby-enterprise-edition-nginx-and-passenger-aka-mod_rails-on-ubuntu/&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='gems'&gt;Gems&lt;/h2&gt;

&lt;p&gt;The latest version of rubygems was install after install REE.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;sudo&lt;/span&gt; &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="ident"&gt;update&lt;/span&gt; &lt;span class="punct"&gt;--&lt;/span&gt;&lt;span class="ident"&gt;system&lt;/span&gt;
&lt;span class="ident"&gt;sudo&lt;/span&gt; &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="ident"&gt;update&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install all the gems I normally use. Just too many to list.&lt;/p&gt;

&lt;p&gt;Create/edit ~/.gemrc with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="punct"&gt;--&lt;/span&gt;&lt;span class="ident"&gt;no&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;ri&lt;/span&gt; &lt;span class="punct"&gt;--&lt;/span&gt;&lt;span class="ident"&gt;no&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;rdoc&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href='http://docs.rubygems.org/read/chapter/11'&gt;http://docs.rubygems.org/read/chapter/11&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='git'&gt;Git&lt;/h2&gt;

&lt;p&gt;If you use aptitude, you get an old version 1.5.4.x&lt;/p&gt;

&lt;p&gt;&lt;a href='http://serengetisunset.wordpress.com/2009/02/28/installing-git-1613-on-ubuntu-804/'&gt;http://serengetisunset.wordpress.com/2009/02/28/installing-git-1613-on-ubuntu-804/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did this to get the newest version installed. You need the build dependencies for it to work.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;sudo&lt;/span&gt; &lt;span class="ident"&gt;apt&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="ident"&gt;remove&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;core&lt;/span&gt;
&lt;span class="ident"&gt;wget&lt;/span&gt; &lt;span class="ident"&gt;http&lt;/span&gt;&lt;span class="punct"&gt;:/&lt;/span&gt;&lt;span class="regex"&gt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;kernel&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;org&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;pub&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;software&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;scm&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="number"&gt;1.6&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="number"&gt;6&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;tar&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;gz&lt;/span&gt;
&lt;span class="ident"&gt;sudo&lt;/span&gt; &lt;span class="ident"&gt;apt&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="ident"&gt;build&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;dep&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;core&lt;/span&gt;
&lt;span class="ident"&gt;tar&lt;/span&gt; &lt;span class="ident"&gt;xvzf&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="number"&gt;1.6&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="number"&gt;6&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;tar&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;gz&lt;/span&gt;
&lt;span class="ident"&gt;cd&lt;/span&gt; &lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="number"&gt;1.6&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="number"&gt;6&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
&lt;span class="punct"&gt;./&lt;/span&gt;&lt;span class="regex"&gt;configure --with-tcltk
make
sudo make install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Source: &lt;a href='http://brunomiranda.com/past/2008/5/12/deploying_github_repository_with_vlad'&gt;http://brunomiranda.com/past/2008/5/12/deploying_github_repository_with_vlad&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='mysql'&gt;MySQL&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://articles.slicehost.com/mysql'&gt;http://articles.slicehost.com/mysql&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;sudo&lt;/span&gt; &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="ident"&gt;install&lt;/span&gt; &lt;span class="ident"&gt;mysql&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Migrate existing datbase from Heroku&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;sudo gem install taps&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Copy your existing .heroku directory from your dev box to the deploy server.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Create your production db&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;rake db:migrate to get all the struct created&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Pull that db down. For the prayerthread app:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="symbol"&gt;:pull&lt;/span&gt; &lt;span class="punct"&gt;--&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt; &lt;span class="ident"&gt;prayerthread&lt;/span&gt; &lt;span class="ident"&gt;mysql&lt;/span&gt;&lt;span class="punct"&gt;:/&lt;/span&gt;&lt;span class="regex"&gt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;root&lt;/span&gt;&lt;span class="symbol"&gt;:pass@localhost&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;prayerthread_production&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href='http://adamblog.heroku.com/past/2009/2/11/taps_for_easy_database_transfers/'&gt;http://adamblog.heroku.com/past/2009/2/11/taps_for_easy_database_transfers/&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='mail'&gt;Mail&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://articles.slicehost.com/email'&gt;http://articles.slicehost.com/email&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href='http://articles.slicehost.com/2008/7/28/email-preparing-the-slice'&gt;http://articles.slicehost.com/2008/7/28/email-preparing-the-slice&lt;/a&gt; &lt;a href='http://articles.slicehost.com/2008/7/29/postfix-installation'&gt;http://articles.slicehost.com/2008/7/29/postfix-installation&lt;/a&gt; &lt;a href='http://articles.slicehost.com/2008/7/31/postfix-basic-settings-in-main-cf'&gt;http://articles.slicehost.com/2008/7/31/postfix-basic-settings-in-main-cf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good reference if you&amp;#8217;re setting up a full scale mail server:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://articles.slicehost.com/2008/9/2/mail-server-slice-setup'&gt;http://articles.slicehost.com/2008/9/2/mail-server-slice-setup&lt;/a&gt;&lt;/p&gt;

&lt;h1 id='deployment'&gt;Deployment&lt;/h1&gt;

&lt;p&gt;Cobbled deploy recipe using:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://dennisbloete.de/blog/rails-deployment-with-vlad-git-and-passenger'&gt;http://dennisbloete.de/blog/rails-deployment-with-vlad-git-and-passenger&lt;/a&gt; &lt;a href='http://snippets.aktagon.com/snippets/264-Vlad-deployment-recipe-for-Phusion-Passenger'&gt;http://snippets.aktagon.com/snippets/264-Vlad-deployment-recipe-for-Phusion-Passenger&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='deployment_issues'&gt;Deployment Issues&lt;/h2&gt;

&lt;p&gt;There were 3 of them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Vlad error&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; &lt;span class="constant"&gt;Usage&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="regex"&gt;usr&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;bin&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;git&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;submodule&lt;/span&gt; &lt;span class="punct"&gt;[--&lt;/span&gt;&lt;span class="ident"&gt;quiet&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;[--&lt;/span&gt;&lt;span class="ident"&gt;cached&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="ident"&gt;add&lt;/span&gt; &lt;span class="punct"&gt;[-&lt;/span&gt;&lt;span class="ident"&gt;b&lt;/span&gt; &lt;span class="ident"&gt;branch&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;init&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;update&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;summary&lt;/span&gt; &lt;span class="punct"&gt;[-&lt;/span&gt;&lt;span class="ident"&gt;n&lt;/span&gt;&lt;span class="punct"&gt;|--&lt;/span&gt;&lt;span class="ident"&gt;summary&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;limit&lt;/span&gt; &lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;[]]&lt;/span&gt; &lt;span class="punct"&gt;[--]&lt;/span&gt; &lt;span class="punct"&gt;[...]&lt;/span&gt;
 &lt;span class="ident"&gt;rake&lt;/span&gt; &lt;span class="ident"&gt;aborted!&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The issue is because Hardy has an older version of git 1.5.x. Once I upgrade to 1.6, it is fine.&lt;/p&gt;

&lt;p&gt;There was a &lt;a href='http://github.com/jbarnette/vlad-git/commit/f6f98fd994a12848b619fd5a82df355b348ac69b'&gt;commit&lt;/a&gt; to fix this but it wasn&amp;#8217;t yet in the gem. I manually patched the gem file. to address &lt;a href='http://github.com/jbarnette/vlad-git/issues#issue/1'&gt;the&lt;/a&gt; &lt;a href='http://github.com/jbarnette/vlad-git/issues#issue/2'&gt;issue&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Cloning from a remote git repo&lt;/p&gt;

&lt;p&gt;This is an issue when cloning from unfuddle.com (or github.com). You need an ssh key to run vlad from the local box to the deploy server, but then vlad executes the clone from the deploy server so an additional key pair is needed. I looked at setting up ssh forwarding, but &lt;a href='http://jordanelver.co.uk/articles/2008/07/10/rails-deployment-with-git-vlad-and-ssh-agent-forwarding/'&gt;these directions weren&amp;#8217;t clear enough for me&lt;/a&gt;. couldn&amp;#8217;t find clear enough directions.&lt;/p&gt;

&lt;p&gt;Instead, I just created a deploy key pair and uploaded the pub key to unfuddle. That authenticated me but since I am connecting over a non-standard port, I still had an issue.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;SSH Config for non-standard port&lt;/p&gt;

&lt;p&gt;On the deploy box, I needed to tell SSH to use the standard port to connect to unfuddle. Add the following to &lt;code&gt;~&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="regex"&gt;.ssh&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;/code&gt; as noted &lt;a href='http://github.com/guides/addressing-authentication-problems-with-ssh'&gt;here, under theSSH Config section&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="constant"&gt;Host&lt;/span&gt; &lt;span class="ident"&gt;sourcescape&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;unfuddle&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;
  &lt;span class="constant"&gt;Port&lt;/span&gt; &lt;span class="number"&gt;22&lt;/span&gt;
  &lt;span class="constant"&gt;Hostname&lt;/span&gt; &lt;span class="ident"&gt;sourcescape&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;unfuddle&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;
  &lt;span class="constant"&gt;IdentityFile&lt;/span&gt; ~&lt;span class="punct"&gt;/.&lt;/span&gt;&lt;span class="ident"&gt;ssh&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;unfuddle_rsa&lt;/span&gt;
  &lt;span class="constant"&gt;TCPKeepAlive&lt;/span&gt; &lt;span class="ident"&gt;yes&lt;/span&gt;
  &lt;span class="constant"&gt;IdentitiesOnly&lt;/span&gt; &lt;span class="ident"&gt;yes&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;</content>
  </entry>
  <entry>
    <title>Why I left Heroku</title>
    <link href="http://blog.ryanwood.com/past/2010/1/15/why-i-left-heroku/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2010/1/15/why-i-left-heroku/</id>
    <published>2010-01-15T18:46:00-05:00</published>
    <updated>2010-01-15T18:46:00-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;I love &lt;a href='http://heroku.com'&gt;Heroku&lt;/a&gt;, I really do. They have eliminated nearly all of the hassle surrounding deployment and server management in the Ruby/Rails world. Here&amp;#8217;s the rub&amp;#8230;&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I love &lt;a href='http://heroku.com'&gt;Heroku&lt;/a&gt;, I really do. They have eliminated nearly all of the hassle surrounding deployment and server management in the Ruby/Rails world. Here&amp;#8217;s the rub&amp;#8230;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;They are simply not affordable for the little guy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&amp;#8220;But Ryan&amp;#8221;, you say, &amp;#8220;what about the free plan?&amp;#8221; The &lt;a href='http://heroku.com/pricing#blossom-1'&gt;Blossom-1&lt;/a&gt; plan is great and you do get a lot of value (including some really great &lt;a href='http://addons.heroku.com/'&gt;free add ons&lt;/a&gt;). The problem come when the site starts to grow.&lt;/p&gt;

&lt;p&gt;The free plan is basically &lt;a href='http://en.wikipedia.org/wiki/Loss_leader'&gt;loss leader&lt;/a&gt; &amp;#8211; &amp;#8220;a product sold at a low price (at cost or below cost) to stimulate other, profitable sales.&amp;#8221; It is how they &lt;em&gt;draw you in&lt;/em&gt;, and draw you in they do. It is an awesome service.&lt;/p&gt;

&lt;p&gt;As soon as you need to grow the site just a bit, the price jumps significantly. It&amp;#8217;s a great value at the entry level and, as best I can tell, for larger scale sites as well. It&amp;#8217;s the smaller site with little to no revenue that feels the punch.&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s get specific. I&amp;#8217;m starting a new project and my choice was Heroku at $0/mo or &lt;a href='http://slicehost.com'&gt;Slicehost&lt;/a&gt; (who completely rocks as well) at $20/mo for 256MB VPS. A no-brainer. I chose Heroku. It was easier, simpler, and far less work.&lt;/p&gt;

&lt;p&gt;A couple weeks later, I have some beta users and want to roll out a new notification feature that will require some background processing. To get 2 application processes (&lt;a href='https://heroku.com/how/dynos'&gt;dynos&lt;/a&gt;) and run a background job, the price jumps from $0 to ~$72/mo (2 dynos + 1 worker = &lt;a href='https://heroku.com/pricing#blossom-3'&gt;Blossom-3&lt;/a&gt;). If the database grow beyond 5MB, the I would need to move to &lt;a href='https://heroku.com/pricing#koi-3'&gt;Koi-3&lt;/a&gt; at ~$87/mo.&lt;/p&gt;

&lt;p&gt;Pretty soon I need to send more than 200 emails per month so I need to add the SendGrid Premium add-on for $20/mo bringing the total up to ~$107/mo. On the Slicehost side, I have to do all the work of setting up, configuring, and maintaning the server, BUT I am still paying $20/mo. I may need to ramp up to the the 512MB slice but I&amp;#8217;m still at only $38/mo.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s an estimated ~$69/mo savings. When you are bootstrapping a small project, that it significant.&lt;/p&gt;

&lt;p&gt;Let me reiterate, I &lt;em&gt;love&lt;/em&gt; heroku. I wish there was a plan that was more reasonable at the lower end. Since there is no comparable path on the Heroku side, I&amp;#8217;ve decided to migrate the project back to &lt;a href='http://www.slicehost.com/'&gt;Slicehost&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Stay tuned for my notes on building an Ubuntu slice. I&amp;#8217;m going to document it this time. Really. I will.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The Brave New World</title>
    <link href="http://blog.ryanwood.com/past/2009/11/18/the-brave-new-world/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2009/11/18/the-brave-new-world/</id>
    <published>2009-11-18T22:39:00-05:00</published>
    <updated>2009-11-18T22:39:00-05:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;My employer called me this summer while I was on vacation at the beach with my family to let me know that the doors to our office would be closed upon my return. Not the best news to get when you&amp;#8217;re trying to get refreshed and renew the mind.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;My employer called me this summer while I was on vacation at the beach with my family to let me know that the doors to our office would be closed upon my return. Not the best news to get when you&amp;#8217;re trying to get refreshed and renew the mind.&lt;/p&gt;

&lt;p&gt;Thankfully they gave us a three month window to work from home. That window ended October 31, 2009. I have been toying with the idea of making a living as a consultant for, say, about 10 years now but never had the courage to pull the trigger. I guess I can thank First Data for pulling that trigger for me.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not sure what the road ahead has in store for me, but my &amp;#8220;spare time&amp;#8221; consulting company &lt;a href='http://www.sourcescape.com/'&gt;Sourcescape&lt;/a&gt; is now getting pushed to center stage. I&amp;#8217;m looking forward to the adventure.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Learning Erlang</title>
    <link href="http://blog.ryanwood.com/past/2009/9/26/learning-erlang/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2009/9/26/learning-erlang/</id>
    <published>2009-09-26T10:55:53-04:00</published>
    <updated>2009-09-26T10:55:53-04:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;I was out on a date with my wife last week and in usual fashion, we popped into a Barnes &amp;amp; Noble. She grabbed the lastest edition of People magazine and I wandered over the the &amp;#8220;geek&amp;#8221; section to browse what&amp;#8217;s new. I picked up &lt;a href='http://www.amazon.com/gp/product/193435600X?ie=UTF8&amp;tag=knockonwood-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=193435600X'&gt;Programming Erlang: Software for a Concurrent World&lt;/a&gt;&lt;img src='http://www.assoc-amazon.com/e/ir?t=knockonwood-20&amp;l=as2&amp;o=1&amp;a=193435600X' border='0' height='1' alt='' width='1' style='border:none !important; margin:0px !important;' /&gt;. I figured I would just skim through it put is back but I got hooked.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;I was out on a date with my wife last week and in usual fashion, we popped into a Barnes &amp;amp; Noble. She grabbed the lastest edition of People magazine and I wandered over the the &amp;#8220;geek&amp;#8221; section to browse what&amp;#8217;s new. I picked up &lt;a href='http://www.amazon.com/gp/product/193435600X?ie=UTF8&amp;tag=knockonwood-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=193435600X'&gt;Programming Erlang: Software for a Concurrent World&lt;/a&gt;&lt;img src='http://www.assoc-amazon.com/e/ir?t=knockonwood-20&amp;l=as2&amp;o=1&amp;a=193435600X' border='0' height='1' alt='' width='1' style='border:none !important; margin:0px !important;' /&gt;. I figured I would just skim through it put is back but I got hooked.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not sure why, but I really I got hooked. I bought the book. Being primarily a web developer, I have no idea what I&amp;#8217;d even use Erlang for, but I haven&amp;#8217;t really learned a different paradigm of programming a number of years. So the journey begins. Maybe I&amp;#8217;ll burn out with it or maybe I&amp;#8217;ll build a bridge and be able to see where I could use it in the future or maybe it will just help be to be a more well rounded developer. Time will tell.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Deploying Refinery on Heroku</title>
    <link href="http://blog.ryanwood.com/past/2009/9/18/deploying-refinery-on-heroku/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2009/9/18/deploying-refinery-on-heroku/</id>
    <published>2009-09-18T13:50:00-04:00</published>
    <updated>2009-09-18T13:50:00-04:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;Recently, I have been exploring &lt;a href='http://refinerycms.com/'&gt;Refinery&lt;/a&gt;, a relatively new Rails-based CMS. So far I&amp;#8217;ve been very impressed. One of the sites I been implementing in Refinery will be deployed to &lt;a href='http://heroku.com/'&gt;Heroku&lt;/a&gt; which has &lt;a href='http://docs.heroku.com/constraints'&gt;some constraints&lt;/a&gt; which cause the out-of-the-box version of Refinery to fail. Here&amp;#8217;s how to get it working if you&amp;#8217;re interested.&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;Recently, I have been exploring &lt;a href='http://refinerycms.com/'&gt;Refinery&lt;/a&gt;, a relatively new Rails-based CMS. So far I&amp;#8217;ve been very impressed. One of the sites I been implementing in Refinery will be deployed to &lt;a href='http://heroku.com/'&gt;Heroku&lt;/a&gt; which has &lt;a href='http://docs.heroku.com/constraints'&gt;some constraints&lt;/a&gt; which cause the out-of-the-box version of Refinery to fail. Here&amp;#8217;s how to get it working if you&amp;#8217;re interested.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Updated &lt;span&gt;9/19/2009&lt;/span&gt;: After corresponding with &lt;a href='http://www.d-jones.com/'&gt;David&lt;/a&gt; at &lt;a href='http://resolvedigital.co.nz/'&gt;Resolve Digital&lt;/a&gt;, I added step 2 and corrected a couple of file references. Thanks for the input David.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id='prerequiste'&gt;Prerequiste&lt;/h2&gt;

&lt;p&gt;You will to have or create an new account with &lt;a href='http://aws.amazonaws.com/s3'&gt;Amazon S3&lt;/a&gt; or another third party storage solution supported by &lt;a href='http://github.com/technoweenie/attachment_fu'&gt;attachment_fu&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id='step_1_config_your_buckets'&gt;Step 1: Config your buckets&lt;/h2&gt;

&lt;p&gt;You will need to update your &lt;code&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;amazon_s3&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;yml&lt;/span&gt;&lt;/code&gt; file to include you bucket name, access key, and secret key.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;development&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;
  &lt;span class="ident"&gt;bucket_name&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;myapp&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;development&lt;/span&gt;
  &lt;span class="ident"&gt;access_key_id&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="constant"&gt;XXXX&lt;/span&gt;
  &lt;span class="ident"&gt;secret_access_key&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="constant"&gt;XXXX&lt;/span&gt;
  &lt;span class="ident"&gt;distribution_domain&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="constant"&gt;XXXX&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;cloudfront&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;net&lt;/span&gt;

&lt;span class="punct"&gt;...&lt;/span&gt; &lt;span class="ident"&gt;same&lt;/span&gt; &lt;span class="keyword"&gt;for&lt;/span&gt; &lt;span class="ident"&gt;test&lt;/span&gt; &lt;span class="keyword"&gt;and&lt;/span&gt; &lt;span class="ident"&gt;production&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Note: You will need to create this bucket before you can use it. I used &lt;a href='http://cyberduck.ch/'&gt;CyberDuck&lt;/a&gt; on the mac to connect S3 and create the initial buckets. Check out the bottom of &lt;a href='http://www.hongkiat.com/blog/amazon-s3-the-beginners-guide/'&gt;this post&lt;/a&gt; for some alternatives.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id='step_2_override_the_files_we_will_be_updating_so_they_dont_conflict_when_refinery_is_updated'&gt;Step 2: Override the files we will be updating so they don&amp;#8217;t conflict when Refinery is updated&lt;/h2&gt;

&lt;p&gt;This is the &amp;#8220;approved&amp;#8221; approach to take if you are changing elements of Refinery. Simply override the particular file in &lt;code&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;/code&gt; directory and your Rails app will load it instead of the Refinery equivalent in the plugins directory. Let&amp;#8217;s override the models we need to update&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;mkdir&lt;/span&gt; &lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;p&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;
&lt;span class="ident"&gt;cp&lt;/span&gt; &lt;span class="ident"&gt;vendor&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;images&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;image&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;
&lt;span class="ident"&gt;cp&lt;/span&gt; &lt;span class="ident"&gt;vendor&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;inquiries&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;inquiry&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;
&lt;span class="ident"&gt;cp&lt;/span&gt; &lt;span class="ident"&gt;vendor&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;news&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;news_item&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;
&lt;span class="ident"&gt;cp&lt;/span&gt; &lt;span class="ident"&gt;vendor&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;pages&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;
&lt;span class="ident"&gt;cp&lt;/span&gt; &lt;span class="ident"&gt;vendor&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;resources&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;resource&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt; &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='step_3_override_images_and_resources_to_use_s3'&gt;Step 3: Override Images and Resources to use S3&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;image&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;&lt;/code&gt;, you will need change the options for has_attachment:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="comment"&gt;# From this...&lt;/span&gt;
&lt;span class="ident"&gt;has_attachment&lt;/span&gt; &lt;span class="symbol"&gt;:content_type&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:image&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; 
               &lt;span class="symbol"&gt;:storage&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:file_system&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
               &lt;span class="symbol"&gt;:path_prefix&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;public/images/system&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt;
               &lt;span class="symbol"&gt;:processor&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Rmagick&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; 
               &lt;span class="punct"&gt;...&lt;/span&gt;

&lt;span class="comment"&gt;# To this...&lt;/span&gt;
&lt;span class="ident"&gt;has_attachment&lt;/span&gt; &lt;span class="symbol"&gt;:content_type&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:image&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
               &lt;span class="symbol"&gt;:storage&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:s3&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
               &lt;span class="symbol"&gt;:processor&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Rmagick&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt;
               &lt;span class="punct"&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And in &lt;code&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;resource&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="comment"&gt;# From this...&lt;/span&gt;
&lt;span class="ident"&gt;has_attachment&lt;/span&gt; &lt;span class="symbol"&gt;:storage&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:file_system&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
       &lt;span class="symbol"&gt;:size&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;kilobytes&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;50&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;megabytes&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
       &lt;span class="symbol"&gt;:path_prefix&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;public/system/resources&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
       
&lt;span class="comment"&gt;# To this&lt;/span&gt;
&lt;span class="ident"&gt;has_attachment&lt;/span&gt; &lt;span class="symbol"&gt;:storage&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:s3&lt;/span&gt;
       &lt;span class="symbol"&gt;:size&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;kilobytes&lt;/span&gt;&lt;span class="punct"&gt;..&lt;/span&gt;&lt;span class="number"&gt;50&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;megabytes&lt;/span&gt; &lt;span class="comment"&gt;#,&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This should now send uploads to S3.&lt;/p&gt;

&lt;h2 id='step_4_update_search_index_location'&gt;Step 4: Update search index location&lt;/h2&gt;

&lt;p&gt;We now need to update the options hash for &lt;a href='http://douglasfshearer.com/blog/rails-plugin-acts_as_indexed'&gt;acts_as_indexed&lt;/a&gt; in each of the models that we overwrote in step 1. You will need to add the following key pair to the hash:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="symbol"&gt;:index_file&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="constant"&gt;RAILS_ROOT&lt;/span&gt;&lt;span class="punct"&gt;,&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;tmp&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For example, in &lt;code&gt;&lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;image&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;acts_as_indexed&lt;/span&gt; &lt;span class="symbol"&gt;:fields&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:title&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
&lt;span class="comment"&gt;# becomes&lt;/span&gt;
&lt;span class="ident"&gt;acts_as_indexed&lt;/span&gt; &lt;span class="symbol"&gt;:fields&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:title&lt;/span&gt;&lt;span class="punct"&gt;],&lt;/span&gt; &lt;span class="symbol"&gt;:index_file&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="constant"&gt;RAILS_ROOT&lt;/span&gt;&lt;span class="punct"&gt;,&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;tmp&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure you find each instance where acts_as_indexed is used. It would be nice if you could just update a global setting that would override the default, but as of this writing, you have to do it on each model.&lt;/p&gt;

&lt;h2 id='step_5_create_a_gems_file'&gt;Step 5: Create a .gems file&lt;/h2&gt;

&lt;p&gt;Heroku requires a &lt;code&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;gems&lt;/span&gt;&lt;/code&gt; file for it to install the required gems on their servers. Create &lt;code&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;gems&lt;/span&gt;&lt;/code&gt; in the root directory with the following content.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;unicode&lt;/span&gt;
&lt;span class="comment"&gt;# Add any other gems you require here&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='step_6_deploy'&gt;Step 6: Deploy&lt;/h2&gt;

&lt;p&gt;Now comes the easy part&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;span class="ident"&gt;git&lt;/span&gt; &lt;span class="ident"&gt;push&lt;/span&gt; &lt;span class="ident"&gt;heroku&lt;/span&gt; &lt;span class="ident"&gt;master&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Tada &amp;#8230; you&amp;#8217;re live on Heroku.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Haml/Sass 2.2 is out</title>
    <link href="http://blog.ryanwood.com/past/2009/7/7/hamlsass-22-is-out/" rel="alternate" />
    <id>http://blog.ryanwood.com/past/2009/7/7/hamlsass-22-is-out/</id>
    <published>2009-07-07T09:28:40-04:00</published>
    <updated>2009-07-07T09:28:40-04:00</updated>
    <author>
      <name>Ryan Wood</name>
    </author>
    <summary type="html">&lt;p&gt;Anyone who knows me knows that I&amp;#8217;m a big fan of Haml and Sass. They simplify and clean up so much HTML-related code. The new version promises some &lt;a href='http://nex-3.com/posts/84-haml-sass-2-2-released'&gt;nice new features&lt;/a&gt;.&lt;/p&gt;</summary>
    <content type="html">&lt;p&gt;Anyone who knows me knows that I&amp;#8217;m a big fan of Haml and Sass. They simplify and clean up so much HTML-related code. The new version promises some &lt;a href='http://nex-3.com/posts/84-haml-sass-2-2-released'&gt;nice new features&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
</feed>
