<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>humandoing software &#187; rails</title>
	<atom:link href="http://blog.humandoing.net/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.humandoing.net</link>
	<description>better software for everyone</description>
	<lastBuildDate>Fri, 06 Jan 2012 16:17:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Vlad 2.0 dies when you try to use :scm =&gt; :git</title>
		<link>http://blog.humandoing.net/2009/09/26/vlad-2-0-dies-when-you-try-to-use-scm-git/</link>
		<comments>http://blog.humandoing.net/2009/09/26/vlad-2-0-dies-when-you-try-to-use-scm-git/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 04:58:47 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vlad]]></category>

		<guid isPermaLink="false">http://blog.humandoing.net/?p=209</guid>
		<description><![CDATA[Presently upgrading to Snow Leopard, and this kicked me in the teeth. The latest Vlad gem is 2.0, but the documentation is still, um, rough (that&#8217;s being generous). $ script/console Loading development environment &#40;Rails 2.3.2&#41; default formats are encoded in ISO-8859-1 &#62;&#62; require 'vlad' =&#62; &#91;&#34;Vlad&#34;&#93; &#62;&#62; Vlad.load :app =&#62; :passenger, :scm =&#62; :git MissingSourceFile: [...]]]></description>
			<content:encoded><![CDATA[<p>Presently upgrading to Snow Leopard, and this kicked me in the teeth. The latest Vlad gem is 2.0, but the documentation is still, um, rough (that&#8217;s being generous).</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ script<span style="color:#006600; font-weight:bold;">/</span>console
Loading development environment <span style="color:#006600; font-weight:bold;">&#40;</span>Rails 2.3.2<span style="color:#006600; font-weight:bold;">&#41;</span>
default formats are encoded <span style="color:#9966CC; font-weight:bold;">in</span> ISO<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">8859</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'vlad'</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;Vlad&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> Vlad.<span style="color:#CC0066; font-weight:bold;">load</span> <span style="color:#ff3333; font-weight:bold;">:app</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:passenger</span>, <span style="color:#ff3333; font-weight:bold;">:scm</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:git</span>
MissingSourceFile: no such file to <span style="color:#CC0066; font-weight:bold;">load</span> <span style="color:#006600; font-weight:bold;">--</span> vlad<span style="color:#006600; font-weight:bold;">/</span>git</pre></div></div>

<p>Anyways, it turns out that as of Vlad 2.0, the git portion of Vlad (probably others as well) are separated out into their own gems.</p>
<p>To fix:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">sudo gem install vlad<span style="color:#006600; font-weight:bold;">-</span>git</pre></div></div>

<p>Thanks to <a href="http://www.ur-ban.com/blog/2009/09/15/vlad-2-0-not-finding-tasks-in-deploy-rb/">Richard Hart</a>, through whom I found the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2009/09/26/vlad-2-0-dies-when-you-try-to-use-scm-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grep Multiple Words</title>
		<link>http://blog.humandoing.net/2009/09/11/grep-multiple-words/</link>
		<comments>http://blog.humandoing.net/2009/09/11/grep-multiple-words/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 00:14:14 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.humandoing.net/?p=239</guid>
		<description><![CDATA[There might be an easier way to do this without escaping the regex to grep, but for my small brain to remember later on &#8211; I wanted to grep the output of rake routes and search for two strings (logical OR): rake routes &#124; grep “\&#40;give\&#124;gift\&#41;”]]></description>
			<content:encoded><![CDATA[<p>There might be an easier way to do this without escaping the regex to grep, but for my small brain to remember later on &#8211; I wanted to grep the output of rake routes and search for two strings (logical OR):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rake routes <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> “\<span style="color: #7a0874; font-weight: bold;">&#40;</span>give\<span style="color: #000000; font-weight: bold;">|</span>gift\<span style="color: #7a0874; font-weight: bold;">&#41;</span>”</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2009/09/11/grep-multiple-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If You Can Read This&#8230;</title>
		<link>http://blog.humandoing.net/2008/12/28/if-you-can-read-this/</link>
		<comments>http://blog.humandoing.net/2008/12/28/if-you-can-read-this/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 11:14:00 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://humandoing.net/past/2008/12/28/if_you_can_read_this/</guid>
		<description><![CDATA[&#8230;then the DNS has propagated, and all is good with the world. Well, maybe not the whole &#8216;good with the world&#8217; thing, but definitely the DNS has propagated, which means you&#8217;re viewing the site on it&#8217;s shiny new Linode &#160;VPS running on mod_rails (AKA: Phusion Passenger). Media Temple was a great host, but something changed [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;then the <span class="caps">DNS</span> has propagated, and all is good with the world. Well, maybe not the whole &#8216;good with the world&#8217; thing, but definitely the <span class="caps">DNS</span> has propagated, which means you&#8217;re viewing the site on it&#8217;s shiny new <a href="http://linode.com">Linode</a> &nbsp;<span class="caps">VPS</span> running on <a href="http://modrails.com">mod_rails</a> (<span class="caps">AKA</span>: Phusion Passenger).</p>
<p>Media Temple was a great host, but something changed over the past several months, and my Capistrano deployments were no longer working. It was less of a headache to get a better host than it was to figure out what actually went wrong, and it&#8217;s about time I started bumbling around in happy server deployment land again. It doesn&#8217;t hurt that mod_rails drastically reduces the Ibuprofen required in the deployment of Rails apps.</p>
<p>As an aside, it&#8217;s been so long since I&#8217;ve looked at Apache configs in any depth, that it took me a few minutes to figure out how to use the same <code>VirtualHost</code> config for both humandoing.net and www.humandoing.net. The answer (at least the one I used) was <code>ServerAlias</code>. I&#8217;m surprised that this didn&#8217;t appear anywhere in the mod_rails docs, but I guess it&#8217;s more of an Apache thing than a mod_rails thing.</p>
<p>See my config below:</p>
<pre><code>&lt;VirtualHost ip_goes_here:80&gt;<br/>  ServerName humandoing.net<br/>  ServerAlias www.humandoing.net <br/>  DocumentRoot /var/www/apps/humandoing/current/public<br/>&lt;/VirtualHost&gt;<br/></code></pre>
<p>I&#8217;m doing deployment using <a href="http://rubyhitsquad.com/Vlad_the_Deployer.html">Vlad</a> instead of Capistrano, but man, the documentation sucks. I think that the problem is almost that it&#8217;s too easy to use, but that aside &#8211; the documentation still seems uber-lacking.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2008/12/28/if-you-can-read-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paperclip Problems</title>
		<link>http://blog.humandoing.net/2008/10/17/paperclip-problems/</link>
		<comments>http://blog.humandoing.net/2008/10/17/paperclip-problems/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 09:19:00 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://humandoing.net/past/2008/10/17/paperclip_problems/</guid>
		<description><![CDATA[I&#8217;ve started to use Paperclip on a pet project I&#8217;m working on (a recommendation from Josh Owens), and the API is great, except for the fact that I couldn&#8217;t get it to work. Files were being uploaded fine, but my thumbnail and other variations were not generating. The documentation says that the whiny_thumbnails option defaults [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started to use <a href="http://github.com/thoughtbot/paperclip/tree/master">Paperclip</a> on a pet project I&#8217;m working on (a recommendation from <a href="http://josh.the-owens.com/">Josh Owens</a>), and the <span class="caps">API</span> is great, except for the fact that I couldn&#8217;t get it to work.</p>
<p>Files were being uploaded fine, but my thumbnail and other variations were not generating. The documentation says that the <code>whiny_thumbnails</code> option defaults to true, but my reality seems to dictate otherwise.</p>
<p>After I added that&#8230;</p>
<pre><code>has_attached_file :receipt, <br/>                  :styles =&gt; { :medium =&gt; "600x600&gt;", :thumb =&gt; "100x100&gt;" }, <br/>                  :whiny_thumbnails =&gt; true<br/></code></pre>
<p>&#8230;I was at least getting an error:</p>
<pre><code>/tmp/stream.13496.0 is not recognized by the 'identify' command.</code></pre>
<p>At long last, I figured that the error message is totally inaccurate. What it really meant is &#8220;I&#8217;m looking for &#8216;identify&#8217; in <code>/usr/bin</code> instead of <code>/opt/local/bin</code> even though <code>/opt/local/bin</code> is in your user path&#8221;.</p>
<p>For fixing:</p>
<pre><code>cd /usr/bin<br/>sudo ln -s  /opt/local/bin/convert convert<br/>sudo ln -s  /opt/local/bin/identify identify<br/></code></pre>
<p>You&#8217;ll probably only have this problem if you installed ImageMagick via MacPorts (as I did). I probably could have fixed it by adding <code>/opt/local/bin</code> to the <code>$PATH</code> used by the web server user, but whatever. This worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2008/10/17/paperclip-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano Upgrade Problem</title>
		<link>http://blog.humandoing.net/2007/08/30/capistrano-upgrade-problem/</link>
		<comments>http://blog.humandoing.net/2007/08/30/capistrano-upgrade-problem/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 06:59:00 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://humandoing.net/past/2007/8/31/capistrano_upgrade_problem/</guid>
		<description><![CDATA[A few days ago I ran a sudo gem update and unwittingly got a Capistrano 2.0.0 upgrade that broke my ability to deploy a bunch of existing Rails apps. cap deploythe task `deploy' does not exist Hmm. That sucks. Nick to the rescue. Here&#8217;s the culprit: gem list &#124; egrep -v "^( &#124;$)" ......capistrano (2.0.0, [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I ran a <code>sudo gem update</code> and unwittingly got a <a href="http://www.capify.org/">Capistrano</a> 2.0.0 upgrade that broke my ability to deploy a bunch of existing Rails apps.</p>
<pre><code>cap deploy<br/>the task `deploy' does not exist</code></pre>
<p>Hmm. That sucks. <a href="http://waxcathartic.org">Nick</a> to the rescue. Here&#8217;s the culprit:</p>
<pre><code>gem list | egrep -v "^( |$)" <br/>...<br/>...<br/>capistrano (2.0.0, 1.4.1, 1.4.0)<br/>...<br/>...</code></pre>
<p>Needed to uninstall all the Capistrano gem versions, and install the last working one (apparently 2.0.0 is not backwards compatible with 1.4.1 &#8211; which I didn&#8217;t know until today).</p>
<p>Here we go:</p>
<pre><code>sudo gem uninstall capistrano -v 2.0.0<br/>sudo gem uninstall capistrano -v 1.4.1<br/>sudo gem uninstall capistrano -v 1.4.0</code></pre>
<p>Say <strong>Yes</strong> when it asks you to uninstall the <code>cap</code> and <code>capify</code> binaries.</p>
<p>Now let&#8217;s install 1.4.1 again:</p>
<pre><code>sudo gem install capistrano -v 1.4.1</code></pre>
<p>Yay! It works! Time to fix those deploy scripts&#8230; when I have time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2007/08/30/capistrano-upgrade-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails and XML (a little late)</title>
		<link>http://blog.humandoing.net/2007/08/28/ruby-on-rails-and-xml-a-little-late/</link>
		<comments>http://blog.humandoing.net/2007/08/28/ruby-on-rails-and-xml-a-little-late/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 21:06:00 +0000</pubDate>
		<dc:creator>Daniel Wintschel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://humandoing.net/past/2007/8/29/ruby_on_rails_and_xml/</guid>
		<description><![CDATA[I wrote this article for IBM developerWorks a while back, but never ended up blogging about it. So at any rate, here it is: Ruby on Rails and XML &#8211; for better or for worse.]]></description>
			<content:encoded><![CDATA[<p>I wrote this article for <span class="caps">IBM</span> developerWorks a while back, but never ended up blogging about it. So at any rate, here it is: <a href="http://www.ibm.com/developerworks/edu/x-dw-x-rubyonrailsxml.html">Ruby on Rails and <span class="caps">XML</span></a> &#8211; for better or for worse.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.humandoing.net/2007/08/28/ruby-on-rails-and-xml-a-little-late/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

