<?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>Aldosoft</title>
	<atom:link href="http://aldosoft.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aldosoft.com</link>
	<description>We build crisp, intuitive web-based systems</description>
	<lastBuildDate>Tue, 13 Apr 2010 07:59:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Big Effing Deal: Three Thoughts about iPhone OS 4.0 Terms</title>
		<link>http://aldosoft.com/blog/2010/04/big-effing-deal-thoughts-about-iphone-developer-terms/</link>
		<comments>http://aldosoft.com/blog/2010/04/big-effing-deal-thoughts-about-iphone-developer-terms/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 23:04:49 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[smartphones]]></category>
		<category><![CDATA[webos]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://aldosoft.com/?p=413</guid>
		<description><![CDATA[With the release of the iPhone OS 4.0 development beta, a lot of people are working themselves into a lather over changes in the iPhone developer program agreement, which have the effect of banning applications not created using the native development tools. People should just get over it and get back to work, on the iPhone platform if they like, or on alternatives if they must.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>The release of the iPhone OS 4.0 developer beta has a lot of people <a href="http://whydoeseverythingsuck.com/2010/04/steve-jobs-has-just-gone-mad.html">working themselves into a lather</a> <small>(<a href="http://fulldisclojure.blogspot.com/2010/04/steve-jobs-just-ruined-iphone-for.html">another</a>)</small> over changes in the iPhone developer program agreement, which have the effect of banning applications not created using the native development tools. More specifically, cross-compiled Flash applications (among others).</p>

<p>I&#8217;ve got three thoughts about the changes, but they basically amount to &#8220;big effing deal.&#8221; You can talk or blog about it all you want, but I think it&#8217;s all hot air (including this post ;-), and we should all just get back to work.</p>

<h3>The King Makes the Rules</h3>

<p>First, it&#8217;s Apple&#8217;s platform, and just like every sovereign nation gets to make their own laws, Apple gets to make the rules for how people get to participate. If you want to create native applications and distribute through the App Store, you follow the rules. Period.</p>

<p>There are important, strategic, and rational <a href="http://daringfireball.net/2010/04/why_apple_changed_section_331">reasons why Apple doesn&#8217;t want to allow a cross-platform framework like Flash to become powerful</a> on their platform. These reasons are <a href="http://daringfireball.net/2008/02/flash_iphone_calculus">based on long experience with Adobe</a> <small>(<a href="http://daringfireball.net/2010/02/flash_saga">more here</a>)</small>, and with <a href="http://www.electronista.com/articles/10/04/11/apple.ceo.says.iphone.cross.compilers.poor/">cross-platform frameworks for the Mac</a>.</p>

<p>You may not like it, but it&#8217;s hard to argue that Apple doesn&#8217;t have the right to do as they please.</p>

<h3>There is Already a Permitted Cross-Platform Framework</h3>

<p>Second, any developer who wants to build a cross-platform mobile application, that works on iPhone, Android, Blackberry, etc., can do so today, using technologies that Apple doesn&#8217;t just permit, they actively support. HTML5, CSS, and JavaScript run very well on the iPhone, Android, and Palm&#8217;s webOS, and any other mobile platform of importance.</p>

<p>Why would any developer whine about being locked into Apple&#8217;s platform turn around and tie themselves to Adobe&#8217;s proprietary Flash platform? At least Apple is aggressively driving their platform forward, Flash performance on anything but Windows PCs has been abysmal for many years, with only a few signs of change, and only recently, under competitive threat.</p>

<h3>Let the Market Decide</h3>

<p>Finally, if you&#8217;re so offended by Apple&#8217;s position that you can&#8217;t just develop using open standards like HTML5, you feel the need to &#8220;punish&#8221; Apple, well&#8230; <strong>go for it.</strong> Android, Blackberry, webOS, and soon Windows Mobile 7 all have developer programs and app stores, and offer a range of alternative models for how to manage and control a mobile platform.</p>

<p>Instead of ranting on your blog or crying in your beer, get coding for the platform that best fits your idea of how the vendor should build and manage their ecosystem. Go be a part of their success, and prove that your preferred model works.</p>

<p>If you turn out to be right, you can be sure Apple will notice, and adapt. (Posting angry words on your blog, not so much.)</p>

<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2010/04/big-effing-deal-thoughts-about-iphone-developer-terms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using TypeKit with the Thesis Theme for WordPress</title>
		<link>http://aldosoft.com/blog/2009/12/using-typekit-with-thesis-theme-for-wordpress/</link>
		<comments>http://aldosoft.com/blog/2009/12/using-typekit-with-thesis-theme-for-wordpress/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 05:38:59 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[thesiswp]]></category>
		<category><![CDATA[typeface]]></category>
		<category><![CDATA[typekit]]></category>

		<guid isPermaLink="false">http://aldosoft.com/?p=377</guid>
		<description><![CDATA[The [Thesis theme for WordPress](http://diythemes.com/?a_aid=4adfe571ce91b) offers excellent typography out of the box. But, like anything else on the web, it is limited in the number of fonts that it can reliably support, because there are not very many "web safe" fonts out there. [TypeKit](http://typekit.com/) is a new service that promises to change that. This document explains how to use TypeKit with Thesis to enable more interesting typography on your Thesis-powered [WordPress](http://wordpress.org/) web site.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>One of the things that drew me to evaluating and purchasing the <a href="/link/thesis-theme">Thesis theme for WordPress</a> was the outstanding typography that seemed to be a part of every Thesis site I looked at.</p>

<p><img src="http://aldosoft.com/wordpress-content/uploads/2009/12/thesis-font-selection.png" alt="Thesis Font Selection" title="Thesis font options are simple to use" width="299" height="225" class="size-full alignright frame wp-image-387" /> The settings for fonts are simple to use &#8212; you choose a single typeface for each option &#8212; but behind the scenes, Thesis builds a complete &#8220;font stack,&#8221; that is, a comprehensive collection of fonts to use, sorted in order of preference. This ensures that your text will look good, no matter what fonts are installed on a viewer&#8217;s computer.</p>

<p>For example, when you choose <strong>Georgia</strong> for your main font, behind the scenes Thesis specifies a series of fonts that are similar to Georgia:</p>

<p><code>font-family: Georgia, 'Times New Roman', Times, serif;</code></p>

<p>The variety of typefaces offered by Thesis is somewhat limited, due to the nature of fonts on the web today; there&#8217;s only a dozen or so that are &#8220;safe&#8221; to use, because everyone has them. But recently a few services have come along, which take advantage of new features in modern web browsers to offer more variety in type. Possibly the most &#8220;mature&#8221; of these (with mature being a relative term) is <a href="http://typekit.com/">TypeKit</a>. But how do you use TypeKit with Thesis, when Thesis only allows you to choose fonts from a pre-defined list?</p>

<p>It turns out that this is quite easy to accomplish. In a nutshell, you treat TypeKit as a second <code>custom.css</code> file. There are three simple steps:</p>

<p><span id="more-377"></span></p>

<ol>
<li><p>On TypeKit, create your &#8220;kit&#8221; for your web site. Use the same CSS selectors here that you would use in your <code>custom.css</code> file if you were specifying them there:</p>

<p><a href="/wordpress-content/uploads/2009/12/typekit-create-kit-with-thesis-selectors.png"><img src="/wordpress-content/uploads/2009/12/typekit-create-kit-with-thesis-selectors-300x265.png" alt="Add Thesis CSS selectors" title="In TypeKit, create your font &quot;kit&quot; with Thesis custom CSS selectors. (click for larger version)" width="300" height="265" class="size-medium frame wp-image-381" /></a></p>

<p>You can uncheck any font weights that you&#8217;re not planning to use, and you can leave the default CSS Stack setting. Be sure to click the (big ass?) Publish button!</p></li>
<li><p>When you&#8217;ve got your kit specified, copy the embedding code from TypeKit:</p>

<p><a href="/wordpress-content/uploads/2009/12/typekit-copy-javascript.png"><img src="/wordpress-content/uploads/2009/12/typekit-copy-javascript-300x265.png" alt="Copy JavaScript embedding code from TypeKit" title="In TypeKit, click the Embedding Code link to show the JavaScript you need to copy and paste into Thesis. (click for larger version)" width="300" height="265" class="size-medium frame wp-image-380" /></a></p>

<p>Click the <strong>Embed Code</strong> link at the top right of the page to see this.</p></li>
<li><p>Switch back to your site, and paste the TypeKit JavaScript into Thesis, in the Header Scripts section of the Thesis Options panel:</p>

<p><a href="/wordpress-content/uploads/2009/12/typekit-paste-javascript-into-thesis.png"><img src="/wordpress-content/uploads/2009/12/typekit-paste-javascript-into-thesis-293x300.png" alt="Paste TypeKit JavaScript into Thesis" title="On your site, on the Thesis Options page, paste the TypeKit JavaScript into the Header Scripts field. (click for larger version)" width="293" height="300" class="size-medium frame wp-image-382" /></a></p></li>
</ol>

<p>At this point, you should be able to reload your site, and see the new font(s) in action, wherever you have set them to be used. If you want have additional control over the use of your TypeKit fonts, such as bold, italic, text spacing (tracking), etc., you can add it to your <code>custom.css</code> file as normal. This is all straightforward CSS. TypeKit is only specifying the font family; all other font settings are handled by Thesis (automatically) or your <code>custom.css</code> file.</p>

<p>There is one aspect of customizing your CSS font specifications that might not be obvious: when a typeface comes with a more broad range of weights, say, from light to ultra bold, how do you specify which weight to use? The answer is very simple, just add a font-weight CSS attribute with a numeric value from this list:</p>


<div class="wp_syntax"><div class="code"><pre class="css"><span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">200</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Thin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Light &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">400</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Normal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">500</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Medium / Semi-Bold */</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">600</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* (not used) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">700</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Bold &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">800</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Black &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">900</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* &nbsp;Heavy &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span></pre></div></div>


<p>So, if you want to use the <a href="http://typekit.com/fonts/136">Milibus typeface</a> for your navigation menu, but the default weight of normal seems a little light to you, while bold is just <em>too</em> bold, to use the semi-bold face just add this to your <code>custom.css</code>:</p>


<div class="wp_syntax"><div class="code"><pre class="css"><span style="color: #808080; font-style: italic;">/* Make the weight of the nav menu a little stronger for Milibus */</span>
<span style="color: #6666ff;">.custom</span> ul<span style="color: #6666ff;">.menu</span> li<span style="color: #6666ff;">.tab</span> a <span style="color: #00AA00;">&#123;</span>
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">500</span><span style="color: #00AA00;">;</span> &nbsp;<span style="color: #808080; font-style: italic;">/* semi-bold */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>


<p>Again, do not specify the font-family in your <code>custom.css</code> file for elements that will use fonts from TypeKit. TypeKit handles the font-family for you; you do everything else in <code>custom.css</code>.</p>

<p>I hope this inspires you to get (more) creative with type on your web site!</p>

<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2009/12/using-typekit-with-thesis-theme-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Aldosoft Relaunched</title>
		<link>http://aldosoft.com/blog/2009/11/aldosoft-relaunched/</link>
		<comments>http://aldosoft.com/blog/2009/11/aldosoft-relaunched/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 00:30:39 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[Aldosoft]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[thesiswp]]></category>
		<category><![CDATA[wp-plugins]]></category>

		<guid isPermaLink="false">http://aldosoft.com/?p=300</guid>
		<description><![CDATA[Two weeks ago I relaunched the Aldosoft web site, improving both the visual design and the code behind it, and adding a blog for posts like this one. This article is a brief description of the technical changes and additions.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>Two weeks ago I relaunched the Aldosoft web site, improving both the visual design and the code behind it, and adding a blog for posts like this one. Some things remain the same; it still runs on <a href="http://wordpress.org/">WordPress</a>, because that&#8217;s perfect for a content-focused site like this one. This article is a brief description of the technical changes and additions.</p>

<div class="wp-caption" style="width: 275px; float: left;"><img src="http://aldosoft.com/wordpress-content/uploads/2009/11/aldosoft-old-300x204.png" alt="Aldosoft 2005" title="The old Aldosoft design, from 2005 or before" width="265" height="181" class="size-medium wp-image-348" />
<p class="wp-caption-text">The Old Aldosoft</p></div>

<div class="wp-caption" style="width: 275px; float: left;"><img src="http://aldosoft.com/wordpress-content/uploads/2009/11/aldosoft-new-300x204.png" alt="Aldosoft 2010" title="The new Aldosoft design, based on Thesis 1.6" width="265" height="181" class="size-medium wp-image-347" />
<p class="wp-caption-text">The New Aldosoft</p></div>

<p><br style="clear: both;" /></p>

<p><span id="more-300"></span></p>

<p>The most obvious difference is visual. After playing with a number of options for a new design, I chose the <a href="/link/thesis-theme">Thesis theme framework</a>. I&#8217;ll eventually write more about why I selected Thesis, but for now, it combines great visual design, including fantastic typography and flexible layouts, with terrific customization options. It also generates outstanding, beautiful HTML and CSS. I have customized it moderately, but mostly stuck with the Thesis minimalist, text-focused aesthetic.</p>

<p>In addition to WordPress and Thesis, I&#8217;m using a variety of WordPress plugins to add visible features, or otherwise affect the display of this site, including:</p>

<ul>
<li><a href="http://wordpress.org/extend/plugins/subscribe-to-comments/">Subscribe to Comments</a><br />
Allows people to subscribe to new comments on individual posts. Great for people who read an article covering a specific topic, and want to be notified if more information is added.</li>
<li><a href="http://wordpress.org/extend/plugins/text-control-2/">Text Control</a><br />
Prettyfies (technical term) text, and allows me to use simplified markup (instead of raw HTML) when formating longer posts with lots of structure (sections, lists, etc.). It allows the use of Textile, Markdown, or WordPress&#8217;s built-in formatting, on a post-by-post basis.</li>
<li><a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a><br />
There are a variety of Twitter plugins for WordPress. TwitterTools is the most powerful, though not the simplest to use.</li>
<li><a href="http://wordpress.org/extend/plugins/wp-cufon/">WP-Cufon</a><br />
Makes it easy to use the <a href="http://cufon.shoqolate.com/">Cuf&oacute;n</a> font replacement technique, which lets you reliably and accessibly use more than just &#8220;web safe&#8221; fonts. I&#8217;m using it to display the <a href="http://www.campivisivi.net/titillium/">Titillium typeface</a> for headlines, etc.</li>
<li><a href="http://wordpress.org/extend/plugins/wp-syntax/">WP-Syntax</a><br />
I&#8217;ll have a longer post about syntax highlighting soon, but this is the plugin I chose to make posted source code more readable.</li>
</ul>

<p>I also have a set of administrative and &#8220;infrastructure&#8221; plugins, which are not visible externally, but I find extremely useful in managing any WordPress site:</p>

<ul>
<li><a href="http://wordpress.org/extend/plugins/akismet/">Akismet</a> (included with WordPress)<br />
Absolutely mandatory anti-comment spam tool. Life would suck without it.</li>
<li><a href="http://wordpress.org/extend/plugins/google-analyticator/">Google Analyticator</a><br />
Activates Google Analytics (visitor statistics) on the site. Technically Thesis has an option that could replace this, but Analyticator is so much more automatic and complete.</li>
<li><a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">Google XML Sitemaps</a><br />
Automatically generates a <code>sitemap.xml</code> file whenever I update the site. Creating a site map for Google is an essential part of getting good rankings in search results.</li>
<li><a href="http://wordpress.org/extend/plugins/redirection/">Redirection</a><br />
A sophisticated tool for automatically redirecting people when they come to a bad URL. Probably <em>too</em> sophisticated, the user interface is complex, but I&#8217;m used to it&#8230;</li>
<li><a href="http://wordpress.org/extend/plugins/woopra/">Woopra</a><br />
Another web stats tool, basically a competitor to Google Analytics. I&#8217;m trying both.</li>
<li><a href="http://wordpress.org/extend/plugins/wp-db-backup/">WordPress Database Backup</a><br />
Automatically sends me a backup of the WordPress database, once a week, via email. Automatic backups rule.</li>
</ul>

<p class="note">This list of plugins is constantly evolving. I&#8217;ll try to post updated versions a couple times a year.</p>

<p>That&#8217;s what&#8217;s new on the technical side. Of course, as much work as the technical pieces were, I rewrote nearly every word on every page, and that was a <em>lot</em> more effort. In the end, a web site is only as good as the content, and the technology is secondary. Ideally I&#8217;ve done well with both.</p>

<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2009/11/aldosoft-relaunched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying Thesis styles in print</title>
		<link>http://aldosoft.com/blog/2009/11/applying-thesis-styles-in-print/</link>
		<comments>http://aldosoft.com/blog/2009/11/applying-thesis-styles-in-print/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 07:31:29 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[stylesheets]]></category>
		<category><![CDATA[thesiswp]]></category>

		<guid isPermaLink="false">http://aldosoft.com/?p=270</guid>
		<description><![CDATA[Although Thesis is the most advanced WordPress theme available, it does not provide a print stylesheet, and so web pages print completely unstyled. This is a problem that is easily solved with Thesis's customizability, and a few lines of CSS.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>The <a href="/link/thesis-theme">Thesis theme for WordPress</a> is arguably the most advanced premium theme for <a href="http://wordpress.org">WordPress</a>-driven web sites. It combines fantastic layout flexibility (1-, 2-, and 3-columns, in various arrangements) with strong design customizability (colors for virtually every element are customizable, plus borders, padding, fonts and sizing, etc.) and terrific typography. Out of the box it looks great in all major web browsers, and can be customized wildly to achieve <a href="http://diythemes.com/thesis/showcase/?a_aid=4adfe571ce91b">incredible diversity in visual design</a>.</p>

<p>But, oddly, printing pages from a Thesis-based site will often remind you of how the web looked in 1996. That&#8217;s because by default the Thesis theme applies its styling only to on-screen display. Printing is entirely unstyled:</p>

<p><img src="http://aldosoft.com/wordpress-content/uploads/2009/11/thesis_printing-thm1-580x388.png" alt="Thesis on-screen vs. printed" title="Thesis web sites often print completely unstyled, which harkens back to the mid-1990s." width="580" height="388" class="size-large wp-image-294" /></p>

<p>The gory details of the how and why are in a DIYThemes forum posting I made a couple days ago, <a href="http://diythemes.com/forums/customization/16156-printing-like-looks-screen.html#post80030">Thesis prints unstyled by default. This is not good.</a> Fortunately, it is possible to extend Thesis with PHP code, in ways that most themes would never dream of, and this gives us options for better printing.</p>

<p>The beginning of a solution is to add a stylesheet for print; the recommended placement is in <code>thesis/custom/print.css</code>. Then you add the link tag to your site via a hook function in your <code>custom_functions.php</code> file:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> add_print_stylesheet<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;stylesheet&quot; href=&quot;'</span> <span style="color: #339933;">.</span> THESIS_CUSTOM_FOLDER <span style="color: #339933;">.</span> 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">'/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;'</span><span style="color: #339933;">;</span>
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_print_stylesheet'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<p>Now you have an active, but empty, print.css stylesheet. You still have unstyled content when you print. What&#8217;s next?</p>

<p>There are two approaches you can take:</p>

<ul>
<li>Create a new print.css stylesheet from scratch, adding only the minimum styling required to make printouts look the way you want. Ultimately, this can produce the best results.</li>
<li>Import the on-screen stylesheets into the print stylesheet, and then add further additions, customizations, and overrides from there.</li>
</ul>

<p>The second option will result in printouts looking exactly like your site does in a web browser. For some kinds of content this will not be ideal, but for most pages it&#8217;s better than being completely unstyled when printed, and it is a <em>lot</em> easier than writing a new stylesheet from scratch. If you&#8217;re looking for the quickest way to get to &#8220;pretty good,&#8221; this is the way to go.</p>

<p>To do it, put this in your print.css file:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css"><span style="color: #a1a100;">@import url(&quot;../style.css&quot;) print;</span>
<span style="color: #a1a100;">@import url(&quot;layout.css&quot;) print;</span>
<span style="color: #a1a100;">@import url(&quot;custom.css&quot;) print;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebars</span> <span style="color: #00AA00;">&#123;</span>
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>


<p>The <code>#sidebars</code> block removes your sidebars when printing. This is what most sites will want to do, but if you don&#8217;t, just delete lines 5-7.</p>

<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2009/11/applying-thesis-styles-in-print/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Making Your WordPress Blog Appear in a Non-Root Folder</title>
		<link>http://aldosoft.com/blog/2009/08/blog-in-non-root-folder/</link>
		<comments>http://aldosoft.com/blog/2009/08/blog-in-non-root-folder/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 06:49:21 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.aldosoft.dev/?p=38</guid>
		<description><![CDATA[It's easy to use WordPress to build an entirely static content site, based on [Pages](http://codex.wordpress.org/Pages). The setting for changing the Home page from a list of Posts to a static Page is easy to find, and obvious in use. But moving the blog to the same level as other sections of the site is not so obvious. There are multiple related settings, and even the [WordPress Codex page on the topic](http://codex.wordpress.org/Making_Your_Blog_Appear_in_a_Non-Root_Folder) is out-of-date.

This article documents the simplest approach required to build a site like this one, a basic mostly-static WordPress site, where the blog is not the focus of the home page, but pushed down to the same secondary "non-root" level as all the other pages.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p><p>The Aldosoft site is a mostly static content site, with a few pages describing who we are and what we do. When I started working on the redesign for the site, one of the main things I wanted to add was a blog for, well, articles like this one.</p>

<p>It&#8217;s pretty easy to use <a href="http://wordpress.org/">WordPress</a> to build an entirely static content site, based on <a href="http://codex.wordpress.org/Pages">Pages</a>. This is what the old Aldosoft site did. The setting for changing the Home page from a list of Posts to a static Page is easy to find, and obvious in use.</p>

<p>Putting a blog onto the site, &#8220;pushed off&#8221; the home page to a section at the same level as other pages of the site, is not so obvious. There&#8217;s a number of different settings which seem relevant, but how they all fit together is not clear. <a href="http://codex.wordpress.org/Making_Your_Blog_Appear_in_a_Non-Root_Folder">The documentation in the WordPress Codex</a> (from which the title of this post is taken) is not written with the latest version of WordPress in mind, and makes it seem more complicated than it actually is.</p>

<p>Various Google searches turned up more semi-obsolete, incomplete, or just plain wrong answers. (Any article that says you need to add new files to your theme is outdated, at least for WordPress 2.8+ installations.) This article documents the simplest approach required to build a site like this one, a basic mostly-static WordPress site, where the blog is not the focus of the home page, but pushed down to the same secondary level as all the other pages.</p>

<p><span id="more-38"></span></p>

<p>You need to do three simple things:</p>

<ol>
<li><p>Create a new page (not post), with no content (the page content will be replaced by your blog posts, once you finish step #2). This should be named whatever you want to call the blog section; here it&#8217;s just &#8220;Blog&#8221;. The page slug should be what you want to use for the URL to your blog; in my case it&#8217;s &#8220;blog&#8221;. (Told you this would be simple.)</p></li>
<li><p>Set the front page to &#8220;static&#8221; mode, and activate displaying your posts (your blog) on the new page. Settings > Reading > Front page displays:</p>

<p><img src="http://aldosoft.com/wordpress-content/uploads/2009/08/wp-settings-front-page.png" alt="WordPress Settings &gt; Reading &gt; Front Page" title="Moving your blog off the front page, to a &quot;secondary&quot; level, is very easy." width="431" height="189" class="size-full frame wp-image-182" /></p>

<p>You are setting the &#8220;Front page&#8221; (or root of your site) to be the static page that will be the home page, and the &#8220;Posts page&#8221; to be the page you created in step #1.</p></li>
<li><p>Change your permalink structure, and use the Custom permalink structure to add your blog&#8217;s slug to the permalinks.</p>

<p><img src="http://aldosoft.com/wordpress-content/uploads/2009/08/wp-settings-permalinks-blog.png" alt="WordPress Settings &gt; Permalinks" title="This is how you set your permalink structure to match the same URL for your blog main page." width="550" height="45" class="size-full frame wp-image-183" /></p>

<p>This is optional if your preferred URLs don&#8217;t need to have posts appear &#8220;under&#8221; the main blog listing page. It will work either way.</p></li>
</ol>

<p>There additional steps you will want to take if your theme does not automatically recognize the new Blog page, if you want to add links to your blog archives, etc. But those are steps you would need to take for any WordPress site, not specific to hosting your site&#8217;s blog at the secondary level.</p>

<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2009/08/blog-in-non-root-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PostgreSQL server and Ruby gem on Mac OS X</title>
		<link>http://aldosoft.com/blog/2009/04/installing-postgres-for-ruby-on-mac-os-x/</link>
		<comments>http://aldosoft.com/blog/2009/04/installing-postgres-for-ruby-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:19:52 +0000</pubDate>
		<dc:creator>Alderete</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[os-x]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.aldosoft.dev/?p=27</guid>
		<description><![CDATA[How to compile and install both the PostgreSQL relational database server and the associated Ruby database driver for Postgres, for doing Ruby on Rails development with PostgreSQL on Mac OS X 10.5 "Leopard".<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p>
]]></description>
			<content:encoded><![CDATA[<p></p>	<p>I recently needed to install the PostgreSQL database server on my Mac for development with Ruby on Rails. I ran into a few gotchas, and while I was eventually able to Google and guess my way to success, it took a while. This installation guide is as much for me, 6 months from now, as it is for others who may wish to also install Postgres.</p>

	<p>These instructions were current as of April 22, 2009, and were executed on Mac OS X 10.5.6 with Rubygems 1.3.2 and the Postgres 8.3.7 distribution. The shelf life of these instructions is probably brief, though they should work at least as a rough guide until the next major release of Mac OS X, or of Postgres.</p>

	<p><span id="more-27"></span></p>

	<h2>Preferences and Biases</h2>

	<p>There are other Postgres + Rails instructions which recommend the use of either MacPorts or Fink. I personally dislike these solutions; part of it is having used Fink in its early days and having it screw up royally, and part of it is a sense that the efforts are misplaced. (Why not make your Open Source contribution of how to get a project properly compiled and installed on Mac OS X directly in the project itself?) In any event, I refuse to use either&#8230;though I agree that they have a place for people less comfortable compiling software directly from source code.</p>

	<p>I also prefer not to use pre-compiled binary installations of Open Source tools, unless the maintainer has demonstrated a long-term commitment and expertise in building and maintaining the package. Marc Liyanage did a terrific job with <a href="http://www.entropy.ch/software/macosx/php/"><span class="caps">PHP</span> 5 for Mac OS X</a> releases up through &#8220;Tiger.&#8221; MySQL is doing a great job creating <a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">Mac OS X installer packages for the MySQL database</a>. But many binary installations either make odd decisions about where to put things, or don&#8217;t get maintained, or make module/configuration/packaging decisions different from what I need, or all three.</p>

	<p>So I generally prefer to compile from source code, and install my additions to Mac OS X in <code>/usr/local</code>. Dan Benjamin explains <a href="http://hivelogic.com/articles/view/using_usr_local/">the logic and benefits of <code>/usr/local</code></a> in exhausting detail, I won&#8217;t go into it further. Either you agree, and these instructions may be useful to you, or you don&#8217;t, and you should keep Googling.</p>

	<h2>Prerequisites and Preconditions</h2>

	<ul>
		<li>These instructions are for Mac OS X 10.5 &#8220;Leopard&#8221; only.</li>
		<li>You need to be comfortable, or better yet confident, on the command line.</li>
		<li>You need to have Apple&#8217;s developer tools installed.</li>
		<li>You need to have current versions of Ruby on Rails and Rubygems installed.</li>
		<li>You need to understand what it means to update your $PATH environment, preferrably in <code>~/.bash_login</code>. You <em>do</em> have a <code>~/.bash_login</code> file, right?</li>
	</ul>

	<p>But mostly this document assumes that you&#8217;ve already gone through the <a href="http://hivelogic.com/articles/view/ruby-rails-leopard/">outstanding instructions for installing a complete Ruby on Rails development suite</a> provided at Hivelogic. Indeed, if you didn&#8217;t use those instructions, at least mostly, you probably shouldn&#8217;t use mine either.</p>

	<h2>The Instructions</h2>

	<p>There are two things that need to be installed, the Postgres server and the Ruby gem for the Postgres database driver. You will also want to add a launchd task for starting and stopping the database server.</p>

	<h3>Installing the PostgreSQL Database Server</h3>

	<p>Postgres traditionally runs as a &#8220;daemon,&#8221; or background process, and manages all control to its files, especially its data. This requires that you create a dedicated user account and group, which only Postgres will use. While you <em>could</em> do this in the Accounts preference pane, it&#8217;s better to do this from the command line, so that the system won&#8217;t treat the Postgres user like a normal user. This is done with the Directory Service command line utility, <code>dscl</code>. </p>

	<p>Before creating the Postgres user you need to pick out internal ID numbers for the user and group. You need to find a number that is not currently in use, so start by seeing what <em>is</em> in use. View the list of user accounts and ID numbers (note that some output is elided):</p>

<pre class="terminal">$ <strong>dscl . -list /Users UniqueID</strong>
_amavisd           83
_appowner          87
_appserver         79
[...]
_mysql             74
[...]
alderete           501
daemon             1
nobody             -2
root               0</pre>

	<p>Next the groups:</p>

<pre class="terminal">$ <strong>dscl . -list /Groups PrimaryGroupID</strong>
_amavisd                       83
_appowner                      87
_appserveradm                  81
[...]
_mysql                         74
[...]
tty                            4
utmp                           45
wheel                          0</pre>

	<p>Within these lists you want to find an ID number under 500 that is not in use. My <cite href="http://www.working-software.com/node/30" title="Building and Installing PostgreSQL on Mac OS X">primary source for these instructions</cite> recommending adding 100 to the ID for MySQL, which seems reasonable. It&#8217;s also probably helpful to find a number that is available for both the user and the group ID, so you don&#8217;t have to worry about which is which. From the output above, I chose 174, which met both criteria. </p>

	<p>With chosen user and group IDs, create the user. Here we are creating a user with a $HOME of <code>/usr/local/pgsql</code>, the location where we will be installing Postgres. We&#8217;re also creating the user in such a way that it&#8217;s useful only as a daemon; it is not possible to log in to the system as this user, either at the normal login screen or via ssh.</p>

<pre class="terminal">$ <strong>sudo dscl . -create /Users/postgres UniqueID 174</strong>
$ <strong>sudo dscl . -create /Users/postgres PrimaryGroupID 174</strong>
$ <strong>sudo dscl . -create /Users/postgres HomeDirectory /usr/local/pgsql</strong>
$ <strong>sudo dscl . -create /Users/postgres UserShell /usr/bin/false</strong>
$ <strong>sudo dscl . -create /Users/postgres RealName "PostgreSQL Administrator"</strong>
$ <strong>sudo dscl . -create /Users/postgres Password \*</strong></pre>

	<p>Now verify that the user was created as expected, by reading back the values from the system:</p>

<pre class="terminal">$ <strong>dscl . -read /Users/postgres</strong>
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 0024E028-00A9-48FB-B14A-68026D442870
HomeDirectory: /usr/local/pgsql
Password: *
PrimaryGroupID: 174
RealName:
 PostgreSQL Administrator
RecordName: postgres
RecordType: dsRecTypeStandard:Users
UniqueID: 174
UserShell: /usr/bin/false</pre>

	<p>Follow a similar procedure to create and verify the group:</p>

<pre class="terminal">$ <strong>sudo dscl . -create /Groups/postgres PrimaryGroupID 174</strong>
$ <strong>sudo dscl . -create /Groups/postgres Password \*</strong>
$ <strong>dscl . -read /Groups/postgresAppleMetaNodeLocation: /Local/Default</strong>
GeneratedUID: 7A7F8760-455F-4315-84DD-2DA330AD9845
Password: *
PrimaryGroupID: 174
RecordName: postgres
RecordType: dsRecTypeStandard:Groups</pre>

	<p>With the dedicated user and group created, you can now download, compile, and install Postgres. The <a href="http://www.postgresql.org/download/">source code distribution</a> can be downloaded from one of the Posgresql.org mirrors. If you use Safari to download it, be sure you&#8217;ve turned off the <span class="ui">Open &#8220;safe&#8221; files after downloading</span> option. (And leave it off, it is a <a href="http://daringfireball.net/linked/2006/02/21/safari-shell-scripts">known security risk</a>.)</p>

	<p>Move the archive to your preferred location (such as <code>/usr/local/src</code>), start a Terminal session there, and:</p>

<pre class="terminal">$ <strong>tar zxvf postgresql-8.3.7.tar.gz</strong>
$ <strong>cd postgresql-8.3.7</strong>
$ <strong>./configure</strong>
[...]
$ <strong>make</strong>
[...]
$ <strong>sudo make install</strong>
[...]</pre>

	<p><strong>Note:</strong> there may be options you want to enable with the configure script, such as encryption or authentication methods. Use <code>./configure --help</code> to get more details.</p>

	<p>Installing the software does not actually create a location to store the database data, or initialize the system databases. Do that next:</p>

<pre class="terminal">$ <strong>sudo mkdir /usr/local/pgsql/data</strong>
$ <strong>sudo chown postgres:postgres /usr/local/pgsql/data</strong>
$ <strong>sudo -u postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</strong>
Password:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
[...]
Success. You can now start the database server using:
    /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
or
    /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start</pre>

	<p>You&#8217;ll want to create a Postgres user (distinct from the system user for Postgres), but before you can do that, you need to start the server. Below I describe how you can have Postgres start automatically when your computer boots, but for now, let&#8217;s just start it up manually:</p>

<pre class="terminal">$ <strong>/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start</strong></pre>

	<p>Now create that Postgres user, and a default database for it to use. This is the account that you will eventually use in the database.yml file of your Rails applications. And finally, use the <code>psql</code> command line tool to verify that we&#8217;ve successfully created the user and database.</p>

<pre class="terminal">$ <strong>sudo -u postgres createuser alderete</strong>
$ <strong>createdb</strong>
$ <strong>psql</strong>
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
[...]
alderete=# <strong>\l</strong>
               List of databases
           Name           |  Owner   | Encoding 
--------------------------+----------+----------
 alderete                 | alderete | UTF8
 postgres                 | postgres | UTF8
 template0                | postgres | UTF8
 template1                | postgres | UTF8
(4 rows)
alderete=# <strong>\q</strong></pre>

	<p><strong>Note:</strong> The above illustrates creating a database user and new database, both named for my Unix account name, &#8220;alderete&#8221;. Using the Unix account name simplifies using Postgres&#8217;s command line tools, you won&#8217;t have to enter the Postgres account name every time. But that will only work if your name is &#8220;alderete&#8221; too. ;-) Instead, use <em>your</em> Unix (or &#8220;short&#8221;) account name instead! This will likely be visible in your command line prompt, but it will also appear in the list of users you generated at the beginning of these instructions.</p>

	<p>Finally, add important Postgres directories to your various system paths. Add the following lines to your <code>~/.bash_login</code> file:</p>


<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$PATH</span>:/usr/local/pgsql/bin&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MANPATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$MANPATH</span>:/usr/local/pgsql/man&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LD_LIBRARY_PATH</span>:/usr/local/pgsql/lib&quot;</span></pre></div></div>


	<p>Be sure to source this file to activate the new environment settings:</p>

<pre class="terminal">$ <strong>. ~/.bash_login</strong></pre>

	<h3>Install the Postgres Ruby Gem</h3>

	<p>Normally installing a Ruby gem is pretty simple, but the Postgres database driver has native (compiled) components, and these need to be linked against the Postgres binary. The problem is that by default Postgres is only built for the hardware architecture of your computer (PowerPC <em>or</em> Intel), while the gem appears to try to link against <em>both</em> architectures. This causes an error, and the helpful suggestion that appears with the error message does not in fact work, producing the exact same error message.</p>

	<p>The trick to getting past this is to set the preferred architecture right on the gem install command, like so:</p>

<pre class="terminal">$ <strong>sudo env ARCHFLAGS='-arch i386' gem install \
  postgres -- --with-pgsql-dir=/usr/local/pgsql</strong>
Password:
Building native extensions.  This could take a while...
Successfully installed postgres-0.7.9.2008.01.28
1 gem installed</pre>

	<p>(If you&#8217;re still using a PowerPC-based computer, change &#8220;i386&#8221; to &#8220;ppc&#8221;.)</p>

	<p>This should allow the gem to install successfully.</p>

	<h3>Automatically Starting Postgres at System Startup</h3>

	<p>On my development systems I&#8217;m using the database constantly, and so I have it set to start up automatically, as part of my computer&#8217;s boot process. The &#8220;Leopard&#8221; way to do this is to add a launchd task to your system. This is a text file that you&#8217;ll save on your desktop, and then move to <code>/Library/LaunchDaemons/org.postgresql.dbms.plist</code>. The following was copied from my primary source (see below):</p>


<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot;</span>
<span style="color: #00bbdd;"> &nbsp; &nbsp;&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plist</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Label<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.postgresql.dbms<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UserName<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>postgres<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>GroupName<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>postgres<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProgramArguments<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/usr/local/pgsql/bin/postmaster<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>-D<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/usr/local/pgsql/data<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>StandardErrorPath<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/usr/local/pgsql/logs/postgresql.log<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>RunAtLoad<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;true</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


	<p>Once this file is in place, you can load it by restarting your computer, or with this command:</p>

<pre class="terminal">$ <strong>sudo launchctl load /Library/LaunchDaemons/org.postgresql.dbms.plist</strong></pre>

	<p>If you can believe it, you&#8217;re done. Pour a cold one, or get right to it with <code>rails mynewapp -d postgresql</code>. Good luck!</p>

	<h2>Sources, Citations, and Credits</h2>

	<p>By far the most complete posting on this topic was <br />
Working Software&#8217;s <a href="http://www.working-software.com/node/30">Building and Installing PostgreSQL on Mac OS X</a>, which covered installing Postgres from source completely. While the instructions above are copy/pasted from my Terminal windows, I was copying lines directly from this article to paste <em>into</em> Terminal in the first place.</p>

	<p>The one thing that wasn&#8217;t covered in the above article was installing the Ruby gem for Postgres, which is required to use Postgres in Rails. The normal <code>gem install [gemname]</code> produced errors, and most suggestions I found didn&#8217;t work any better. What finally did work was including the &#8220;-arch i382&#8221; option directly on the gem installation line, which appears to be orginally published towards the bottom of <a href="http://brionesandco.com/ryanbriones/2008/01/postgresql-on-leopard-for-rails-few.html">PostgreSQL on Leopard for Rails: A few notes</a>. (A few other posts repeat this advice, so I&#8217;m not sure who first published it.)</p>

	<p>Finally, although it&#8217;s quite dated, the Apple Developer Connection article <a href="http://developer.apple.com/internet/opensource/postgres.html">PostgreSQL on Mac OS X</a> provides useful background information, and notes about using Postgres from other languages besides Ruby.<p><hr />Copyright &copy; 2001-2010 by <a href="http://aldosoft.com">Aldosoft</a>. All rights reserved. This feed is provided for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal-2010@aldosoft.com so we can take action immediately.</p></p>]]></content:encoded>
			<wfw:commentRss>http://aldosoft.com/blog/2009/04/installing-postgres-for-ruby-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
