<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Jim Neath</title>
	
	<link>http://jimneath.org</link>
	<description>Ruby on Rails, Javascript, CSS and Standards</description>
	<lastBuildDate>Mon, 16 Feb 2009 12:30:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/JimNeath" type="application/rss+xml" /><item>
		<title>Creating PDF Documents in Ruby on Rails</title>
		<link>http://jimneath.org/2009/02/16/creating-pdf-documents-in-ruby-on-rails/</link>
		<comments>http://jimneath.org/2009/02/16/creating-pdf-documents-in-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 12:30:55 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PDF::Writer]]></category>
		<category><![CDATA[prawn]]></category>
		<category><![CDATA[Prince]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=139</guid>
		<description><![CDATA[Those of you that follow me on Twitter will probably know that I&#8217;ve spent the last week or so trying to find a decent way of generating PDF documents from a Rails application. I finally found a solution that suited my needs so I thought I&#8217;d share it with you lovely people.
Initial Probing
After my first [...]]]></description>
			<content:encoded><![CDATA[<p>Those of you that follow me on Twitter will probably know that I&#8217;ve spent the last week or so trying to find a decent way of generating PDF documents from a Rails application. I finally found a solution that suited my needs so I thought I&#8217;d share it with you lovely people.</p>
<h4>Initial Probing</h4>
<p>After my first round of googling I came across 2 solutions that people seem to be using:</p>
<ul>
<li><a href="http://prawn.majesticseacreature.com/">Prawn</a> combined with <a href="http://cracklabs.com/prawnto">Prawnto</a></li>
<li><a href="http://rubyforge.org/projects/ruby-pdf">PDF::Writer</a></li>
</ul>
<p>I&#8217;ll admit I didn&#8217;t really look too much into PDF::Writer but I did spend a couple of days playing around with Prawn.</p>
<p>All was going well until I ran into certain situations. The two main problems I had with Prawn were that it&#8217;s too difficult to style things as I wanted to and generating a table of contents. I might be missing something but I couldn&#8217;t get my head around how to solve the latter.</p>
<p>I don&#8217;t want to learn a new syntax to define my PDF documents. I don&#8217;t want to learn a new way of styling things. I like my HTML and CSS.</p>
<p><em>WHERE&#8217;S MY HTML AND CSS?!</em></p>
<h4>Introducing Prince</h4>
<p><a href="http://www.princexml.com/">Prince XML</a> is a command line program that takes your spiffy html and css and returns a nicely formatted PDF document for you.</p>
<blockquote><p>Prince is a computer program that converts XML and HTML into PDF documents. Prince can read many XML formats, including XHTML and SVG. Prince formats documents according to style sheets written in CSS.</p></blockquote>
<p>See, I told you.</p>
<p>So, we&#8217;ve got prince xml, but what about hooking it up with rails?</p>
<h4>Introducing Princely</h4>
<p><a href="http://github.com/mbleigh/princely/tree/master">Princely</a> is a fantastic plugin by <a href="http://mbleigh.com/">Michael Bleigh</a>, author of other great plugins, such as <a href="http://github.com/mbleigh/subdomain-fu/tree">subdomain-fu</a> and <a href="http://github.com/mbleigh/acts-as-taggable-on/tree">acts-as-taggable-on</a>.</p>
<p>Princely is basically a wrapper around the Prince API. It allows you to define your PDF views as templates like <code>show.pdf.erb</code>. You can write your views as you would normal html views and Princely will return a pdf when you hit those pages.</p>
<pre><code class="ruby">def show
  respond_to do |format|
    format.html
    format.pdf do
      render :pdf =&gt; "filename", :stylesheets =&gt; ["application", "prince"], :layout =&gt; "pdf"
    end
  end
end
</code></pre>
<p>Awesome, right?</p>
<h4>Installing Prince and Princely</h4>
<p>To install Prince XML, visit the <a href="http://www.princexml.com/download/">download page</a> and chose the package which suits your needs. Done.</p>
<p>Next, to install Princely, run the following command from your Rails app.</p>
<pre><code>script/plugin install git://github.com/mbleigh/princely.git</code></pre>
<h4>Page Numbering</h4>
<p>To set the page numbers of you PDFs you&#8217;ll need to use the <code>counter</code> attribute of CSS3.</p>
<pre><code class="css">@page {
  @bottom-left {
    content: counter(page);
  }
}</code></pre>
<p>This snippet of code will, funnily enough, add the current page number to the bottom left of each page. That&#8217;s all there is to it.</p>
<p>If you&#8217;d prefer to show the page number along with the total number of pages, you can use the following:</p>
<pre><code class="css">@page {
  @bottom-left {
    content: "Page " counter(page) " of " counter(pages);
  }
}</code></pre>
<h4>Table of Contents</h4>
<p>If you&#8217;re creating a large PDF with a few sections, it&#8217;s generally a good idea to include a table of contents at the start of your document.</p>
<p>The first thing you need to do, is output a list of links at the start of you document that link to internal anchors:</p>
<pre><code class="html">&lt;ul id="toc"&gt;
  &lt;li&gt;&lt;a href="#ruby"&gt;Chapter 1: An Introduction to Ruby&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#rails"&gt;Chapter 2: Hello, Rails!&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#prince"&gt;Chapter 3: Pump it up, Prince!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>This will give you a list, that looks something along the lines of the following image:</p>
<p><img class="alignnone size-full wp-image-156" title="toc" src="http://jimneath.org/wp-content/uploads/2009/02/picture-6.png" alt="toc" width="306" height="84" /></p>
<p>Now with a bit of CSS magic, we can add the page numbers from our PDF to the table of contents. Ready for this? Go!</p>
<pre><code class="css">ul#toc a::after
{
  content: leader('.') target-counter(attr(href), page);
}</code></pre>
<p>That&#8217;s it. <code>attr(href)</code> finds the target of the link. <code>target-counter</code> finds the page that the anchor is on and the <code>leader</code> call just pads the left had side with periods. Win.</p>
<p>That nifty bit of CSS should leave you with something looking like this:</p>
<p><img class="alignnone size-full wp-image-157" title="toc unstyled" src="http://jimneath.org/wp-content/uploads/2009/02/picture-7.png" alt="toc unstyled" width="621" height="105" /></p>
<p>A bit more CSS to tidy it up a bit:</p>
<pre><code class="css">ul#toc ul {
	margin: 0;
	list-style: none;
	padding: 0;
}

ul#toc a {
	text-decoration: none;
}

ul#toc li {
	margin: 0;
	padding: 0;
	list-style: none;
}</code></pre>
<p>And then we should have something that looks a bit nicer:</p>
<p><img class="size-full wp-image-158" title="picture-8" src="http://jimneath.org/wp-content/uploads/2009/02/picture-8.png" alt="toc styled" width="583" height="81" /></p>
<p>That&#8217;s all there is to it. Easy, right?</p>
<h4>Metadata</h4>
<p>Prince writes metadata to your PDFs via the meta tags in your html. You can set the document author, subject and keywords using the following:</p>
<pre><code class="html">&lt;head&gt;
  &lt;title&gt;PDF Generation&lt;/title&gt;
  &lt;meta name="author" content="Jim Neath"/&gt;
  &lt;meta name="subject" content="Generating PDFs with Prince"/&gt;
  &lt;meta name="keywords" content="PDF, prince, ruby, rails"/&gt;
&lt;/head&gt;</code></pre>
<h4>Further Reading</h4>
<ul>
<li><a href="http://www.princexml.com/doc/6.0/">Prince XML Documentation</a></li>
<li><a href="http://www.alistapart.com/articles/boom">Printing a Book with CSS: Boom!</a></li>
<li><a href="http://microformats.org/wiki/book-brainstorming">Book Microformat (Boom)</a></li>
<li><a href="http://github.com/mbleigh/princely/tree/master">Princely at Github</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2009/02/16/creating-pdf-documents-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Merb and Rails Merge</title>
		<link>http://jimneath.org/2008/12/23/merb-and-rails-merge/</link>
		<comments>http://jimneath.org/2008/12/23/merb-and-rails-merge/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 21:50:53 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=135</guid>
		<description><![CDATA[Abso-fucking-lutely crazy.
Good news? Bad news? Personally I&#8217;m thinking it&#8217;s a good move and it also means I don&#8217;t have to publish my post about the bitchiness in the Rails vs. Merb camp.
It&#8217;s nice to see that Rails 3.0 is going to be more modular and library agnostic as well. Good news for all use jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Abso-fucking-lutely crazy.</p>
<p>Good news? Bad news? Personally I&#8217;m thinking it&#8217;s a good move and it also means I don&#8217;t have to publish my post about the bitchiness in the Rails vs. Merb camp.</p>
<p>It&#8217;s nice to see that Rails 3.0 is going to be more modular and library agnostic as well. Good news for all use jQuery fan boys.</p>
<p>Anyway, more <a href="http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3/comments/24244#comment-24244">information</a> is <a href="http://yehudakatz.com/2008/12/23/rails-and-merb-merge/">available</a> from <a href="http://brainspl.at/articles/2008/12/23/merb-is-rails">nearly</a> <a href="http://merbist.com/2008/12/23/rails-and-merb-merge/">everywhere</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/12/23/merb-and-rails-merge/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I’m Back!</title>
		<link>http://jimneath.org/2008/12/12/im-back/</link>
		<comments>http://jimneath.org/2008/12/12/im-back/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 17:58:26 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=129</guid>
		<description><![CDATA[Due to the fact that I pay no attention to the renewal dates of domains, jimneath.org expired on Tuesday. And due to the fact I know nothing about computers it&#8217;s taken me until today to get the site back up.
But I&#8217;m back now, so panic over.
]]></description>
			<content:encoded><![CDATA[<p>Due to the fact that I pay no attention to the renewal dates of domains, jimneath.org expired on Tuesday. And due to the fact I know nothing about computers it&#8217;s taken me until today to get the site back up.</p>
<p>But I&#8217;m back now, so panic over.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/12/12/im-back/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Escaping Params Containing Periods</title>
		<link>http://jimneath.org/2008/11/22/escaping-params-containing-periods/</link>
		<comments>http://jimneath.org/2008/11/22/escaping-params-containing-periods/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 09:23:18 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=126</guid>
		<description><![CDATA[Just a quick one. Say you have a route like the following:
map.resources :users
And you&#8217;re using email addresses to look up users like:
/users/jim@somewhere.com
You&#8217;re going to run into an error along the lines of:
Missing template users/show.com.erb in view path blah/app/views
Which obviously isn&#8217;t what you want. To fix this, change your route to the following:
map.resources :users, :requirements => [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one. Say you have a route like the following:</p>
<pre><code class="ruby">map.resources :users</code></pre>
<p>And you&#8217;re using email addresses to look up users like:</p>
<pre><code>/users/jim@somewhere.com</code></pre>
<p>You&#8217;re going to run into an error along the lines of:</p>
<pre><code>Missing template users/show.com.erb in view path blah/app/views</code></pre>
<p>Which obviously isn&#8217;t what you want. To fix this, change your route to the following:</p>
<pre><code class="ruby">map.resources :users, :requirements => { :id => /.*/ }</code></pre>
<p>Rejoice.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/22/escaping-params-containing-periods/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing RubyFu</title>
		<link>http://jimneath.org/2008/11/20/introducing-rubyfu/</link>
		<comments>http://jimneath.org/2008/11/20/introducing-rubyfu/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 20:14:04 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubyfu]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=122</guid>
		<description><![CDATA[RubyFu is a project I&#8217;ve been working on, along with Phil Jeffs, for a couple of weeks now. We&#8217;ve got big plans so keep your eyes peeled.
What is RubyFu?
RubyFu is a community driven ruby news site. Users can submit their news stories, comment on other stories and vote. If a news story receives a vote [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rubyfu.org">RubyFu</a> is a project I&#8217;ve been working on, along with Phil Jeffs, for a couple of weeks now. We&#8217;ve got big plans so keep your eyes peeled.</p>
<h4>What is RubyFu?</h4>
<p>RubyFu is a community driven ruby news site. Users can submit their news stories, comment on other stories and vote. If a news story receives a vote total of less than a certain number, then post is removed. Say bye-bye spam.</p>
<p>At the moment, RubyFu is pretty simple but we have a lot of ideas floating around, so soon it will be more awesome than anything. ever.</p>
<p>So if you&#8217;ve got a post, a tutorial or anything else that you find interesting, come and share it was us at <a href="http://rubyfu.org">RubyFu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/20/introducing-rubyfu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Speeding Up Rails Development</title>
		<link>http://jimneath.org/2008/11/15/speeding-up-rails-development/</link>
		<comments>http://jimneath.org/2008/11/15/speeding-up-rails-development/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 11:03:01 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Bort]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Gems]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=115</guid>
		<description><![CDATA[Over the last few months I&#8217;ve realised that the speed at which I develop new projects is a lot quicker than it used to be. So I thought I&#8217;d share some of the things I&#8217;ve learned and also some quite obvious things (to me at least).
Use a Base Application
I&#8217;m obviously going to be horrifically biased [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few months I&#8217;ve realised that the speed at which I develop new projects is a lot quicker than it used to be. So I thought I&#8217;d share some of the things I&#8217;ve learned and also some quite obvious things (to me at least).</p>
<h4>Use a Base Application</h4>
<p>I&#8217;m obviously going to be horrifically biased due to the fact that I helped to develop <a href="http://github.com/fudgestudios/bort/tree/master">Bort</a>, but I think that base apps are the way to roll. They save you about half a days worth of development and let you get straight into developing your application rather than fucking around doing the same monotonous stuff every time.</p>
<p>So here&#8217;s a run down of base apps floating around:</p>
<ul>
<li><a href="http://github.com/fudgestudios/bort/tree/master">Bort</a> by myself and the rest of the <a href="http://www.fudgestudios.com">Fudge</a> development team</li>
<li><a href="http://giantrobots.thoughtbot.com/2008/10/21/suspenders">Suspenders</a> by by the awesome team at <a href="http://www.thoughtbot.com">Thoughbot</a></li>
<li><a href="http://jamesgolick.com/2008/10/10/blank-a-starter-app-for-r_c-and-shoulda-users">Blank</a> by <a href="http://jamesgolick.com/">James Golick</a></li>
<li><a href="http://github.com/pat-maddox/starter-app/tree/master">Start App</a> by <a href="http://evang.eli.st/blog">Pat Maddox</a></li>
<li><a href="http://appstarter.latticepurple.com/">App Starter</a> by <a href="http://www.latticepurple.com/">Lattice Purple</a></li>
</ul>
<p>I haven&#8217;t used any of these apart from Bort, so I can&#8217;t really give you any opinion but everything I&#8217;ve seen by Thoughtbot and James Golick have always been awesome. Just look through them and find which one suits your needs.</p>
<p>I would like to end this section with a nice graph taken from <a href="http://www.rubyrailways.com/rails-rumble-observations-part-ii-trends-in-gemplugin-usage/">Rails Rumble Observations, part II</a> :)</p>
<p><img src="http://www.rubyrailways.com/wp-content/uploads/2008/11/bort.png" alt="Bort" /></p>
<h4>Write Your Own Scaffold Generator</h4>
<p>The default Rails scaffold generator is alright for prototyping an app but let&#8217;s face it, you wouldn&#8217;t use it for everything. So why don&#8217;t you made your own that you can use for everything. At the start of the last project we worked on, we spent 2-3 days working on a scaffold generator that would help to generate parts of the admin.</p>
<p>We made the generator generate all the search stuff, add sortable tables, generate basic specs and a  whole bunch of other awesome stuff. Now we can get an awesome admin section set up for a model by running line from terminal.</p>
<p>This must have saved us at least a weeks worth of time. Time that we can now spend making sure that the rest of the site is as brilliant as possible. With the extra time, you take it easy, or you could add extra features, improve the UI, whatever. Keep it RESTful, kids.</p>
<h4>Use a Form Builder</h4>
<p>I hate forms. No secret there. But alas, nearly every application you&#8217;ll develop need to have forms. I wrote a custom form builder for the chaps at Fudge and it saves us a hell of a lot of time.</p>
<p>Now instead of writing something like the following:</p>
<pre><code class="ruby">&lt;% form_for @story do |f| %&gt;
  &lt;%= f.error_messages %&gt;
  &lt;fieldset&gt;
    &lt;legend&gt;Story Details&lt;/legend&gt;
    &lt;ol&gt;
      &lt;li&gt;
        &lt;%= f.label :title %&gt;
        &lt;%= f.text_field :title %&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;%= f.label :body, 'Content' %&gt;
        &lt;%= f.text_area :body %&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
    &lt;div class="buttons"&gt;
      &lt;%= f.submit 'Create' %&gt;
    &lt;/div&gt;
  &lt;/fieldset&gt;
&lt;% end %&gt;</code></pre>
<p>Using our form builder we write:</p>
<pre><code class="ruby">&lt;% form_for @story do |f| %&gt;
  &lt;%= f.error_messages %&gt;
  &lt;% f.field_set "Story Details" do %&gt;
    &lt;%= f.text_field :title %&gt;
    &lt;%= f.text_area :body, :label =&gt; 'Content' %&gt;
  &lt;% end %&gt;
  &lt;%= f.submit 'Create' %&gt;
&lt;% end %&gt;</code></pre>
<p>Now imagine you&#8217;re got to write close to 50 forms for an application. Can you guess which ones saves you time? Which one is more enjoyable to use? You got it.</p>
<p>Now while I wouldn&#8217;t say our form builder is ready for the general coding public (it isn&#8217;t), there are still <a href="http://github.com/search?q=form+builder">a few out there</a>.</p>
<p>I have used <a href="http://github.com/rubypond/semantic_form_builder/tree/master">Semantic Form Builder</a> by <a href="http://rubypond.com">RubyPond</a> before and it also happens to be the one we based out form builder on.</p>
<h4>Build a Populate Rake Task</h4>
<p>We started using Populator/Faker a couple of months a go and this is probably one of our biggest time savers. It&#8217;s a pain in the ass adding test data into your applications.</p>
<p>Ryan Bates has made a great railscast on how to use <a href="http://populator.rubyforge.org/">Populator</a> along with <a href="http://faker.rubyforge.org/rdoc/">Faker</a> to <a href="http://railscasts.com/episodes/126-populating-a-database">generate fake data </a>using a rake task so I&#8217;ll leave it to his awesome video to tell you all about it.</p>
<p>There are also a couple other options out there for generating fake data, the <a href="http://random-data.rubyforge.org/">random-data gem</a> and the <a href="http://github.com/sevenwire/forgery/tree/master">Forgery</a> plugin.</p>
<p><a href="http://www.railsinside.com/plugins/151-3-ways-to-build-fake-demo-data-for-your-rails-app.html">Peter Cooper</a> has a more thorough run down of all three options over at <a href="http://www.railsinside.com">Rails Inside</a>.</p>
<h4>Use Plugins/Gems</h4>
<p>This should really go without saying, but I&#8217;ve seen a few people trying to write (poor) code for tasks that have already been solved, tested and improved on.</p>
<p>Gems and plugins are probably your biggest time saver. One of the things I love about the ruby community is that a lot of people give back to it. </p>
<p>If you have a problem, have a look on the awesome GitHub and see if there&#8217;s a plugin/gem floating around that looks like it could solve your problem. Try it out. If it works brilliant, if not see if you can fix it and improve the original code. Then if someone else has the same problem, they can use the plugin. If everyone helps out, we all have an easier job, we can do less work and enjoy life more.</p>
<h4>Seriously, Just Buy a Fucking Mac</h4>
<p>Just do it. Stop making excuses. I was a Windows user for about ten years but mainly because I didn&#8217;t know any better. I now work full time on a mac, both at home and at work, and there&#8217;s not a thing you could do to make me go back to Windows.</p>
<p>Windows simply won&#8217;t do a lot of things that you&#8217;ll want to do. Background jobs? Not a chance. Git? oh yeah, you can use <a href="http://code.google.com/p/msysgit/">msysgit</a> but who the fuck wants to open up a separate program just to use git? Fuck off Windows. You&#8217;re slow and you suck.</p>
<p>Why get a mac? Rails runs faster. You can use the best text editor around, <a href="http://macromates.com/">TextMate</a>. You can install all those gems and plugins that all say: &#8220;This won&#8217;t work on Windows&#8221;. </p>
<p>Think getting a mac is too expensive? Get a low spec <a href="http://store.apple.com/us/browse/home/shop_mac/family/mac_mini?mco=MTE3MTA">mac mini</a> for $599. That&#8217;s what I started using and even though it&#8217;s low spec I <strong>never</strong> had a problem with it. You can use your USB keyboard, mouse and your monitor from your Windows machine. Still think it&#8217;s too much? Have a look on Amazon&#8230; <a href="http://www.amazon.com/gp/product/B000PQJJ10?ie=UTF8&#038;tag=jimnearaidev-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000PQJJ10">Preowned Mac Mini for $350</a><img src="http://www.assoc-amazon.com/e/ir?t=jimnearaidev-20&#038;l=as2&#038;o=1&#038;a=B000PQJJ10" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p>So do you, my lovely readers, have any more suggestions/tips to speed up your development?</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/15/speeding-up-rails-development/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Self Clearing Floats in CSS</title>
		<link>http://jimneath.org/2008/11/15/self-clearing-floats-in-css/</link>
		<comments>http://jimneath.org/2008/11/15/self-clearing-floats-in-css/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 11:02:17 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Clear]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=118</guid>
		<description><![CDATA[This is a quickie mainly to remind myself. My friend and fellow Fudge developer, Mike &#8220;1312&#8221; Byrne showed me a CSS trick to have divs clear themselves.
div#container
{
  height: 1%;
}

div#container:after
{
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
Brilliant. This works in Safari, Firefox and IE6+ as far as I know.
]]></description>
			<content:encoded><![CDATA[<p>This is a quickie mainly to remind myself. My friend and fellow Fudge developer, Mike &#8220;<a href="http://www.thirteentwelve.com/">1312</a>&#8221; Byrne showed me a CSS trick to have divs clear themselves.</p>
<pre><code class="css">div#container
{
  height: 1%;
}

div#container:after
{
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}</code></pre>
<p>Brilliant. This works in Safari, Firefox and IE6+ as far as I know.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/15/self-clearing-floats-in-css/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Getting the Dimensions of a Flash (SWF) File</title>
		<link>http://jimneath.org/2008/11/12/getting-the-dimensions-of-a-flash-swf-file/</link>
		<comments>http://jimneath.org/2008/11/12/getting-the-dimensions-of-a-flash-swf-file/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 14:03:40 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=113</guid>
		<description><![CDATA[This is a just a quick post that will hopefully save some people a hell of a lot of time.
If you&#8217;re trying to get the width and height of a flash file, a banner for example, then you can use the ImageSpec library by Brandon Anderson.
You can checkout the code with the following:
svn checkout http://ruby-imagespec.googlecode.com/svn/trunk/ [...]]]></description>
			<content:encoded><![CDATA[<p>This is a just a quick post that will hopefully save some people a hell of a lot of time.</p>
<p>If you&#8217;re trying to get the width and height of a flash file, a banner for example, then you can use the <a href="http://code.google.com/p/ruby-imagespec/">ImageSpec</a> library by Brandon Anderson.</p>
<p>You can checkout the code with the following:</p>
<pre><code>svn checkout http://ruby-imagespec.googlecode.com/svn/trunk/ vendor/plugins/ruby-imagespec</code></pre>
<p>Then call it in your code to get the dimensions of a flash movie. Say you&#8217;re using Paperclip, then you could do the following:</p>
<pre><code class="ruby">dimensions = ImageSpec::Dimensions.new(@banner.file.path)
dimension.height # Get the height
dimesions.width # Get the width</code></pre>
<p>Rad.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/12/getting-the-dimensions-of-a-flash-swf-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bort Update to Rails 2.2</title>
		<link>http://jimneath.org/2008/11/06/bort-update-to-rails-22/</link>
		<comments>http://jimneath.org/2008/11/06/bort-update-to-rails-22/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 13:14:04 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Bort]]></category>
		<category><![CDATA[rails 2.2]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=108</guid>
		<description><![CDATA[I probably should have done this sooner but I&#8217;ve finally got around to updating Bort to Rails 2.2
Here are some other changed.
Will_paginate, AASM, Rspec and Rspec-rails updated to gems
I&#8217;ve decided to remove the above plugins and unpack the most recent version into the vendor/gems directory. The main reason is its easier to keep track of [...]]]></description>
			<content:encoded><![CDATA[<p>I probably should have done this sooner but I&#8217;ve finally got around to updating <a href="http://github.com/fudgestudios/bort/tree/master">Bort</a> to Rails 2.2</p>
<p>Here are some other changed.</p>
<h4>Will_paginate, AASM, Rspec and Rspec-rails updated to gems</h4>
<p>I&#8217;ve decided to remove the above plugins and unpack the most recent version into the vendor/gems directory. The main reason is its easier to keep track of which version you&#8217;re using and what needs updating. So Bort is currently rocking the most recent versions of those gems.</p>
<h4>Exception Notifier Email Automatically Set to the Email Set in Settings.yml</h4>
<p>This is something I thought we&#8217;d already done but alas not. Thanks to feedback on <a href="http://bort.uservoice.com">UserVoice</a> for that one.</p>
<h4>README Updated</h4>
<p>The readme has been updated to let people know that they need to change the default admin password in the bort_migration along with the RESTFUL_AUTH_SITE_KEY in each of the environment files.</p>
<p>If you haven&#8217;t done this yet, make sure you do it yo.</p>
<h4>Multistage Capistrano Deployment</h4>
<p>Thanks for Phil Jeffs for fixing this one. Bort is now setup out of the box to deploy to a staging environment along with production. </p>
<h4>Bort Sends a 404 on ActiveRecord::RecordNotFound</h4>
<p>This is something that I normally forget to do in applications so it&#8217;s now baked into Bort. If a user requests a page and the record it&#8217;s looking for doesn&#8217;t exist, they&#8217;ll get sent to the 404 page with the correct status. If you don&#8217;t want this to happen, just remove the code from application.rb file.</p>
<h4>Rake db:database_dump</h4>
<p>Matt Hall has added a rake task to allow you to dump the contents of you database. Simply run <code>rake db:database</code> to get a dump of all the contents of your database.</p>
<h4>Upcoming Suggested Changes</h4>
<p>The two main upcoming changes to Bort are:</p>
<h5>Default User Admin Panel</h5>
<p>A lot of people seem to want this feature. We&#8217;re currently on the fence about it. Bort has tried to keep as simple as possible while keeping the features that a lot of us use. Thoughts on this would be great.</p>
<h5>Add i18n support</h5>
<p>Again a lot of people seem to want this but again we&#8217;re on the fence due to the reason above.</p>
<h5>Removal of Role_requirement</h5>
<p>I&#8217;ve noticed a lot of people on github who fork Bort seem to remove role_requirement. Also, I&#8217;ve found myself doing the same thing in favour of other options.</p>
<p>What do you guys think?</p>
<h4>Suggestions? Problems?</h4>
<p>As always, if you have any suggestions or problems then leave a message on our <a href="http://bort.uservoice.com">UserVoice</a> and we&#8217;ll see what we can do.</p>
<p><script src="http://bort.uservoice.com/pages/general/widgets/tab.js?alignment=left&amp;color=0072BC" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/11/06/bort-update-to-rails-22/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Bort! Now with OpenID!</title>
		<link>http://jimneath.org/2008/09/26/bort-now-with-openid/</link>
		<comments>http://jimneath.org/2008/09/26/bort-now-with-openid/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 15:05:37 +0000</pubDate>
		<dc:creator>Jim Neath</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://jimneath.org/?p=101</guid>
		<description><![CDATA[Just a small update on Bort.
Bort Project Page
I decided to make a dedicated page for Bort, so I only have one place to keep up to date. 
Bort Project Page
Open ID Authentication
I&#8217;ve integrated OpenID with RESTful Auth on Bort in the new version. I&#8217;ll be perfectly honest though, I&#8217;ve never actually set up OpenID before, [...]]]></description>
			<content:encoded><![CDATA[<p>Just a small update on <a href="http://github.com/fudgestudios/bort/tree/master">Bort</a>.</p>
<h4>Bort Project Page</h4>
<p>I decided to make a dedicated page for Bort, so I only have one place to keep up to date. </p>
<p><a href="/bort">Bort Project Page</a></p>
<h4>Open ID Authentication</h4>
<p>I&#8217;ve integrated OpenID with RESTful Auth on Bort in the new version. I&#8217;ll be perfectly honest though, I&#8217;ve never actually set up OpenID before, so I&#8217;d appreciate if people could take a look at it and let me know if it sucks.</p>
<h4>User Voice! Load Noises!</h4>
<p>We&#8217;ve set up an account on User Voice so you guys can submit ideas and all that jazz to us, then we can act like power hungry sultans and deny your ideas.</p>
<p><a href="http://bort.uservoice.com">Bort @ User Voice</a></p>
<h4>Bort is Popular!</h4>
<p>At this moment in time, we have 239 watchers on Github and are the <a href="http://github.com/popular/watched">25th most popular project</a>. Hooray for us.</p>
<p><script src="http://bort.uservoice.com/pages/general/widgets/tab.js?alignment=left&amp;color=0072BC" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://jimneath.org/2008/09/26/bort-now-with-openid/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
