<?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>Jordan Brock &#187; rails</title>
	<atom:link href="http://jordanbrock.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://jordanbrock.com</link>
	<description>Pith</description>
	<lastBuildDate>Thu, 08 Apr 2010 09:15:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2nd Gen Accelerators, Rails and attachment_fu</title>
		<link>http://jordanbrock.com/2008/10/17/2nd-gen-accelerators-rails-and-attachment-fu/</link>
		<comments>http://jordanbrock.com/2008/10/17/2nd-gen-accelerators-rails-and-attachment-fu/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 18:38:00 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[accelerator]]></category>
		<category><![CDATA[joyent]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http:///2008/10/17/2nd-gen-accelerators-rails-and-attachment-fu</guid>
		<description><![CDATA[File this one under WTF.
I&#8217;ve been working on an updated version of the Soil Quality website for a little while now, and recently needed to deploy the site to a staging server for testing. I ordered up a 1/4Gb Accelerator from Joyent, configured it, and deployed the app, just like I&#8217;ve done with 20+ other [...]]]></description>
			<content:encoded><![CDATA[<p>File this one under <span class="caps">WTF</span>.</p>
<p>I&#8217;ve been working on an updated version of the <a href="http://www.soilquality.org.au">Soil Quality</a> website for a little while now, and recently needed to deploy the site to a staging server for testing. I ordered up a <a href="http://www.joyent.com/accelerator/">1/4Gb Accelerator</a> from <a href="http://www.joyent.com">Joyent</a>, configured it, and <a href="http://wiki.joyent.com/accelerators:deploying_rails_apps">deployed</a> the app, just like I&#8217;ve done with 20+ other sites, and <span class="caps">BOOM</span>, straight into a brick wall.</p>
<p>I opened up the log files and saw this error:</p>
<pre>
** Daemonized, any open files are closed.  Look at /tmp/soilquality-mongrel.8200.pid and log/mongrel.8200.log for info.
** Starting Mongrel listening at 127.0.0.1:8200
** Define INLINEDIR or HOME in your environment and try again
</pre>
<p>Wonderfully descriptive I know, but something I&#8217;d never run into before. So, fire the the google and it turns out it&#8217;s a common error, with a common fix: just put</p>
<p><code>ENV['INLINEDIR'] = RAILS_ROOT + "/tmp"</code></p>
<p>into your config/environment.rb file, make sure the directory exists and that it&#8217;s writeable by the mongrel, restart, and away you go.</p>
<p>But of course, that didn&#8217;t fix it, did it.</p>
<p>Much hair pulling ensued. I finally enlisted the help of <a href="http://blog.ninjahideout.com/">Darcy Laycock</a> and together we managed to track the problem down to the <a href="http://github.com/technoweenie/attachment_fu/tree/master">attachment_fu plugin</a>, which was causing the problem as the mongrel process booted. OK, so now we knew where the problem lay, but what was causing it.</p>
<p>It turned out to be the ImageScience image processor, or more specifically the way the attachment_fu plugin and ImageScience work together <strong><span class="caps">ON A 2ND GENERATION JOYENT ACCELERATOR</span></strong> &#8211; eg the ones that use pkgsrc. Didn&#8217;t seem to cause the problem on an ubuntu machine, nor on one of the older BlastWave based Accelerators. I&#8217;m not sure why as of yet, as I was more worried about getting some sleep last night when we managed to fix the problem.</p>
<p>And the fix? Basically, strip ImageScience out of attachment_fu. Remove</p>
<pre>vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb</pre>
<p>and remove &#8220;ImageScience&#8221; from this line</p>
<pre>@@default_processors = %w(ImageScience Rmagick MiniMagick Gd2 CoreImage)</pre>
<p>in this file</p>
<pre>vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/attachment_fu.rb</pre>
<p>Like I said, I have no real idea why this is happening at the moment, but I&#8217;ll try and work it out and update this post if I get anywhere.</p>
<p>Once again, thanks to Darcy for A) being a sounding board, B) helping fix the problem and C) being up and available when I needed him <img src='http://jordanbrock.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jordanbrock.com/2008/10/17/2nd-gen-accelerators-rails-and-attachment-fu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freezing Rails with Git</title>
		<link>http://jordanbrock.com/2008/06/12/freezing-rails-with-git/</link>
		<comments>http://jordanbrock.com/2008/06/12/freezing-rails-with-git/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 03:46:00 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http:///2008/06/12/freezing-rails-with-git</guid>
		<description><![CDATA[Now that the Ruby On Rails team has moved the codebase over to github, some of the standard rake tasks aren&#8217;t working the way that they used to. When it was on SVN, it was possible to type
rake rails:freeze:edge TAG=rel_2-0-1
and the appropriate version would be copied into your vendor/rails directory.
Now if you do that, rake [...]]]></description>
			<content:encoded><![CDATA[<p>Now that the Ruby On Rails team has moved the codebase over to <a href="http://github.com">github</a>, some of the standard rake tasks aren&#8217;t working the way that they used to. When it was on <span class="caps">SVN</span>, it was possible to type</p>
<p><code>rake rails:freeze:edge TAG=rel_2-0-1</code></p>
<p>and the appropriate version would be copied into your vendor/rails directory.</p>
<p>Now if you do that, rake downloads a zip of the edge release. Which is fine and all, but sometimes you don&#8217;t want to be on edge &#8230; like in any production site.</p>
<p>So, I found a <a href="http://smartic.us/2008/5/15/freezing-rails-with-git">screencast</a> that goes through the process, but I thought I&#8217;d actually put the text into a post, mainly for my own reference more than anything else.</p>
<pre>
$ rails path_to_app</p>
<p>$ cd path_to_app</p>
<p>$ git init</p>
<p>$ git submodule add git://github.com/rails/rails.git vendor/rails
</pre >
<p>At this point, git will effectively clone the repository, so that you can then choose one of the branches to &#8220;freeze&#8221; to. Type &#8220;git tag&#8221; to get a list of all the available tagged branches. Choose the one you want and type</p>
<p><code>$ git checkout v2.1.0</code></p>
<p>And that&#8217;s it. Slightly more involved than the old way, but still none too shabby.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanbrock.com/2008/06/12/freezing-rails-with-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
