<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Millarian - Home</title>
  <id>tag:millarian.com,2008:mephisto/</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://millarian.com/feed" rel="self" type="application/atom+xml"/>
  <link href="http://millarian.com/" rel="alternate" type="text/html"/>
  <updated>2008-11-09T03:25:40Z</updated>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-11-09:985</id>
    <published>2008-11-09T03:24:00Z</published>
    <updated>2008-11-09T03:25:40Z</updated>
    <category term="Blog"/>
    <category term="Culture"/>
    <category term="Personal"/>
    <link href="http://millarian.com/2008/11/9/anonymous-caring" rel="alternate" type="text/html"/>
    <title>Anonymous Caring</title>
<content type="html">
            &lt;p&gt;I received a wrong number text message today that stated&lt;/p&gt;


&lt;pre&gt;U arent going to give up on
me n stop talking to me bc
things r complicated on my
end, r u?&lt;/pre&gt;

	&lt;p&gt;This person was trying to make a connection with someone who might not be talking with them anymore. They&#8217;re having some difficulties in their relationship that I know nothing about, but if I didn&#8217;t answer their fear/suspicion becomes reality. In essence, by not answering, the person they were trying to reach decided not to answer them. So I jotted off a quick reply&lt;/p&gt;


&lt;pre&gt;Sorry, I think you have the wrong number.&lt;/pre&gt;

	&lt;p&gt;Then added&lt;/p&gt;


&lt;pre&gt;Good luck. I hope it works out.&lt;/pre&gt;

	&lt;p&gt;I&#8217;ve often wondered if sometimes people just need to know that someone cares, even if it&#8217;s anonymous, as in this case. It&#8217;s easy to get wrapped up in ourselves and forget that other people need encouragement and support, too. There are little moments like these everyday that are easy to miss or ignore but that might have an impact in someone&#8217;s life. &lt;strong&gt;Don&#8217;t let those opportunities pass you by.&lt;/strong&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-25:740</id>
    <published>2008-09-25T22:52:00Z</published>
    <updated>2008-09-26T00:43:24Z</updated>
    <category term="Blog"/>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <category term="search"/>
    <category term="sphinx"/>
    <category term="ultrasphinx"/>
    <link href="http://millarian.com/2008/9/25/installing-aspell-and-raspell-for-ultrasphinx" rel="alternate" type="text/html"/>
    <title>Installing aspell and raspell for Ultrasphinx</title>
<content type="html">
            &lt;p&gt;We&#8217;ve been playing around with &lt;a href=&quot;http://www.sphinxsearch.com&quot;&gt;the Sphinx full-text search engine&lt;/a&gt; and Ultrasphinx, the &lt;a href=&quot;http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html&quot;&gt;Ruby on Rails configurator and client to the Sphinx full text search engine&lt;/a&gt;. Sadly, it was giving us a warning about spell checking:&lt;/p&gt;


&lt;code&gt;ultrasphinx: spelling support not available (raspell configuration raised &quot;uninitialized constant Ultrasphinx::Spell::Aspell&quot;)&lt;/code&gt;

	&lt;p&gt;This is pretty easy to get rid of, though. You just need to install the &lt;a href=&quot;http://aspell.net&quot;&gt;aspell, spell checking library&lt;/a&gt; and &lt;a href=&quot;http://sourceforge.net/projects/raspell&quot;&gt;raspell, the Ruby interface to aspell&lt;/a&gt;. The raspell &lt;span class=&quot;caps&quot;&gt;README&lt;/span&gt; has instructions for &lt;a href=&quot;http://blog.evanweaver.com/files/doc/fauna/raspell/files/README.html&quot;&gt;installing aspell and raspell on both Mac and Ubuntu&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;After we did this, we got one additional error:&lt;/p&gt;


&lt;code&gt;ultrasphinx: spelling support not available (raspell configuration raised &quot;No word lists can be found for the language &quot;ap&quot;.&quot;)&lt;/code&gt;

	&lt;p&gt;Follow the instructions for setting up the &lt;a href=&quot;http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/classes/Ultrasphinx/Spell.html&quot;&gt;custom wordlist needed by Ultrasphinx&lt;/a&gt; and you should be good to go.&lt;/p&gt;


	&lt;p&gt;Good luck and happy searching!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-23:738</id>
    <published>2008-09-23T07:35:00Z</published>
    <updated>2008-09-23T07:43:19Z</updated>
    <category term="Blog"/>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <category term="slicehost"/>
    <link href="http://millarian.com/2008/9/23/error-after-upgrading-slicehost" rel="alternate" type="text/html"/>
    <title>Error after upgrading SliceHost</title>
<content type="html">
            &lt;p&gt;If you happen to see this error after upgrading your SliceHost account, be calm.&lt;/p&gt;


&lt;pre&gt;ActionView::TemplateError (Define INLINEDIR or HOME in your environment and try again)&lt;/pre&gt;

	&lt;p&gt;The simple solution is to add an environment declaration to your environment/production.rb file:&lt;/p&gt;


&lt;pre&gt;ENV['INLINEDIR'] = '/path/to/.ruby_inline'&lt;/pre&gt;

	&lt;p&gt;Once that was set, we were in business again&#8230; whew!&lt;/p&gt;


	&lt;h2&gt;References&lt;/h2&gt;


	&lt;p&gt;Here&#8217;s a relevant reference that took a while to find:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.dx13.co.uk/articles/2008/7/6/Problems-with-God--RubyInline-and-Rails.html&quot;&gt;Problems with God, RubyInline and Rails&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-23:737</id>
    <published>2008-09-23T07:09:00Z</published>
    <updated>2008-09-23T07:10:20Z</updated>
    <category term="Blog"/>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="google"/>
    <category term="rails"/>
    <category term="ruby on rails"/>
    <link href="http://millarian.com/2008/9/23/setting-an-spf-record-for-google-apps" rel="alternate" type="text/html"/>
    <title>Quick Tip: Setting an SPF record</title>
<content type="html">
            &lt;p&gt;I recently noticed a lot of rejected emails coming from a production app that had just switched to send mail through Google Apps. For some reason Google felt we might be spammers, so it began rejecting our emails out-of-hand. We would continuously get the following error message:&lt;/p&gt;


&lt;pre&gt;Technical details of permanent failure:
Message rejected.  See http://mail.google.com/support/bin/answer.py?answer=69585 for more information.&lt;/pre&gt;

	&lt;p&gt;That wasn&#8217;t very helpful, but with a little digging it led me to find out about something called an &lt;acronym title=&quot;Sender Policy Framework&quot;&gt;SPF&lt;/acronym&gt; and convinced me that I should set this up. It was really easy and I suggest you do it if you&#8217;re sending mail from your Ruby on Rails application through Google Apps (or some other means).&lt;/p&gt;


	&lt;p&gt;When using Google Apps, simply add a &lt;span class=&quot;caps&quot;&gt;TXT&lt;/span&gt; record to your &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; settings with the following value:&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;v=spf1 mx include:aspmx.googlemail.com &#126;all&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Note also that Google wants you to use include and specify all with a tilde(~), not a plus(+) or minus(-).&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Publishing an &lt;span class=&quot;caps&quot;&gt;SPF&lt;/span&gt; record that lacks include:aspmx.googlemail.com or specifying -all instead of ~all may result in delivery problems.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I also contacted Google to let them know of the error and if you start seeing this, be sure to let them know, too. Either that or setting the &lt;span class=&quot;caps&quot;&gt;SPF&lt;/span&gt; record corrected our problem and we no longer get the rejected emails&#8230;&lt;/p&gt;


	&lt;h2&gt;References&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://articles.slicehost.com/2008/8/8/email-setting-a-sender-policy-framework-spf-record&quot;&gt;Setting a sender policy framework (SPF) record&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?hl=en&amp;amp;#38;answer=33786&quot;&gt;How do I set my &lt;span class=&quot;caps&quot;&gt;SPF&lt;/span&gt; record?&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-20:726</id>
    <published>2008-09-20T06:10:00Z</published>
    <updated>2008-09-20T06:27:18Z</updated>
    <category term="Blog"/>
    <category term="Personal"/>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="freebootr"/>
    <category term="hacknight"/>
    <category term="startup"/>
    <link href="http://millarian.com/2008/9/20/freebootr-ahoy" rel="alternate" type="text/html"/>
    <title>Freebootr Ahoy!</title>
<content type="html">
            &lt;p&gt;I wrote recently about &lt;a href=&quot;http://millarian.com/2008/9/17/hacknight-at-gangplank&quot;&gt;Phoenix Hacknight&lt;/a&gt; (that happens every Wednesday) because I want people to know that there is a vibrant, active community in Phoenix centered around technology. Hacknight has become a place where people meet consistently to network with each other and hack on various projects. I have attended every single Hacknight and closed shop on most of them, but besides the amazing 6 hour hacknight website, I&#8217;ve yet to really release a new idea to the public.&lt;/p&gt;


	&lt;h1&gt;That&#8217;s why I&#8217;m happy to announce the launch of&lt;/h1&gt;


	&lt;p&gt;&lt;a href=&quot;http://freebootr.com&quot;&gt;
  &lt;img src=&quot;http://millarian.com/assets/2008/9/20/freebootr-logo.png&quot; alt=&quot;Freebootr Logo&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;The Idea&lt;/h2&gt;


	&lt;p&gt;Freebootr is an idea hatched at Hacknight by &lt;a href=&quot;http://yourmomshero.com&quot;&gt;Chris Irish&lt;/a&gt; and me. It provides a place for people to easily and quickly find free items in their area as well as post free items they no longer want or need. We hope that this will result in less landfill waste and reduced cost to consumers. We believe this type of service should be free and open to the public and that&#8217;s exactly what we&#8217;ve done. What&#8217;s more, we believe it should be fun to use, which is why the site is &lt;strong&gt;pirate themed&lt;/strong&gt;! Why, you ask?&lt;/p&gt;


&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;freebooter |ˈfrēˌboōtər|&lt;/strong&gt;&lt;/p&gt;
  &lt;p&gt;noun&lt;/p&gt;
  &lt;p&gt;a pirate or lawless adventurer.&lt;/p&gt;
&lt;/blockquote&gt;

	&lt;p&gt;That&#8217;s right, a freebooter is a pirate, so naturally we themed the site after these denizens of the sea. Arrr!&lt;/p&gt;


	&lt;h2&gt;The Journey&lt;/h2&gt;


	&lt;p&gt;Freebootr has been in the works for about 8 weeks at Hacknight. Chris and I have put in about 40 hours each throughout that time and set a goal to release the first version of the product today, on &lt;a href=&quot;http://talklikeapirate.com/piratehome.html&quot;&gt;International Talk Like a Pirate Day&lt;/a&gt;.  We also took a 2 week hiatus to implement the &lt;a href=&quot;http://hacknight.gangplankhq.com&quot;&gt;Hacknight website&lt;/a&gt;. It has been a fun, and somewhat bumpy, ride to get here, but we did it.&lt;/p&gt;


	&lt;h2&gt;The Rest&lt;/h2&gt;


	&lt;p&gt;Now the real work begins, for us and for you.  We want&#8230; nay, &lt;em&gt;need&lt;/em&gt; your feedback to make Freebootr.com a great, useful site. So check it out and be sure to call us out when we suck (and occasionally when we kick ass).&lt;/p&gt;


	&lt;p&gt;Now go out there, me hearty, and become a &lt;a href=&quot;http://freebootr.com&quot;&gt;Freebootr&lt;/a&gt;!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-17:718</id>
    <published>2008-09-17T01:50:00Z</published>
    <updated>2008-09-17T06:25:07Z</updated>
    <category term="Culture"/>
    <category term="Personal"/>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="hacknight"/>
    <category term="integrum"/>
    <category term="video"/>
    <link href="http://millarian.com/2008/9/17/hacknight-at-gangplank" rel="alternate" type="text/html"/>
    <title>Hacknight</title>
<content type="html">
            &lt;p&gt;About 24 weeks ago, we started hosting a regular Wednesday night gathering at our Chandler, Arizona office called hacknight (originally hack-a-mania). We open our office to the public from 6pm until whenever to allow people in the Phoenix area to meet, network, play, eat, have fun and, of course, hack on projects.  After almost 6 months, hacknight is still going strong!&lt;/p&gt;


	&lt;h3&gt;Check out this hacknight video&lt;/h3&gt;


&amp;lt;object height=&quot;300&quot; width=&quot;400&quot;&gt;    &amp;lt;param /&gt;    &amp;lt;param /&gt;    &amp;lt;param /&gt;    &amp;lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=1526236&amp;amp;amp;server=vimeo.com&amp;amp;amp;show_title=1&amp;amp;amp;show_byline=1&amp;amp;amp;show_portrait=0&amp;amp;amp;color=&amp;amp;amp;fullscreen=1&quot; height=&quot;300&quot; width=&quot;400&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;br /&gt;&lt;a href=&quot;http://vimeo.com/1526236?pg=embed&amp;amp;amp;sec=1526236&quot;&gt;Hack Night&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user674370?pg=embed&amp;amp;amp;sec=1526236&quot;&gt;Integrum Technologies&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com?pg=embed&amp;amp;amp;sec=1526236&quot;&gt;Vimeo&lt;/a&gt;.

	&lt;p&gt;Also check out the &lt;a href=&quot;http://hacknight.gangplankhq.com&quot;&gt;people and projects at hacknight&lt;/a&gt;, on the new site devoted to everyone who makes these wonderful events happen!  If you&#8217;re interested in what hacknights are doing for the Phoenix community, be sure to come by the office located at&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;290 E. El Prado Ct., Chandler, &lt;span class=&quot;caps&quot;&gt;AZ 85225&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;We&#8217;re there every Wednesday night, hacking away&#8230; you should be too!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-14:700</id>
    <published>2008-09-14T20:39:00Z</published>
    <updated>2008-09-16T04:50:57Z</updated>
    <category term="Culture"/>
    <category term="Personal"/>
    <category term="music"/>
    <link href="http://millarian.com/2008/9/14/suggest-new-music" rel="alternate" type="text/html"/>
    <title>Suggest New Music</title>
<content type="html">
            &lt;p&gt;I need some new music to add to my collection. I&#8217;ve been listening to the same couple of CDs for the last 4 months. Please help me by recommending your current favorite!&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Leave your suggestions in the comments, I&#8217;ll post my purchases here afterward.&lt;/strong&gt;&lt;/p&gt;


	&lt;h2&gt;The Purchase&lt;/h2&gt;


	&lt;p&gt;So after much time spent listening to samples from the recommendations I received, I settled on five albums. Three came from suggestions, one I&#8217;ve been wanting for a long time and one is the soundtrack of a movie my wife and I saw recently and loved. For better or worse, here they are:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Arcade Fire: Funeral&lt;/li&gt;
		&lt;li&gt;The Decemberists: Picaresque&lt;/li&gt;
		&lt;li&gt;Feist: The Reminder&lt;/li&gt;
		&lt;li&gt;Okkervil River: Black Sheep Boy&lt;/li&gt;
		&lt;li&gt;Once: Soundtrack&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Recommendations&lt;/h2&gt;


	&lt;p&gt;Here is the list of all recommendations (that I didn&#8217;t purchase, but maybe you will?):&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Atmosphere&lt;/li&gt;
		&lt;li&gt;Page France&lt;/li&gt;
		&lt;li&gt;The Mountain Goats&lt;/li&gt;
		&lt;li&gt;Bowerbirds&lt;/li&gt;
		&lt;li&gt;The National&lt;/li&gt;
		&lt;li&gt;The Hold Steady&lt;/li&gt;
		&lt;li&gt;Sufjan Stevens&lt;/li&gt;
		&lt;li&gt;Rodrigo y Gabriela: Rodrigo y Gabriela&lt;/li&gt;
		&lt;li&gt;José González: Veneer&lt;/li&gt;
		&lt;li&gt;Kimya Dawson&lt;/li&gt;
		&lt;li&gt;Mirah&lt;/li&gt;
		&lt;li&gt;Brooke Fraser&lt;/li&gt;
		&lt;li&gt;Portishead&lt;/li&gt;
		&lt;li&gt;Abandoned Pools&lt;/li&gt;
		&lt;li&gt;The Spill Canvas&lt;/li&gt;
		&lt;li&gt;SoftLightes&lt;/li&gt;
		&lt;li&gt;Leslie Hall&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;A big thank you to everyone who gave their 2¢ and feel free to keep the suggestions coming&#8230; I may buy more soon!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-13:698</id>
    <published>2008-09-13T22:29:00Z</published>
    <updated>2008-09-28T19:05:30Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="quick tip"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <category term="time zone"/>
    <link href="http://millarian.com/2008/9/13/quick-tip-rails-2-1-time-zones" rel="alternate" type="text/html"/>
    <title>Quick Tip: Rails 2.1 Time Zones</title>
<content type="html">
            &lt;p&gt;My last &lt;a href=&quot;http://millarian.com/tags/quick%20tip&quot;&gt;quick tip&lt;/a&gt; involved &lt;a href=&quot;http://millarian.com/2008/9/13/quick-tip-setting-timezone-on-ubuntu-hardy&quot;&gt;setting your time zone in Ubuntu Hardy&lt;/a&gt;, so now, how do you set your time zone in a Ruby on Rails application? Rails 2.1 makes it much easier to manage time zone settings than it was previously.&lt;/p&gt;


	&lt;p&gt;Add the following to your environment configuration file:&lt;/p&gt;


	&lt;h3&gt;config/environment.rb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;config.time_zone = 'Arizona'&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Replace Arizona with your own time zone. You can find a list of valid values by running any of the following rake tasks:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;rake time:zones:all
rake time:zones:local
rake time:zones:us&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Your data will still be stored in &lt;span class=&quot;caps&quot;&gt;UTC&lt;/span&gt; time, but it will be converted into the specified time zone when it is type cast on retrieval.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; If you set both your server&#8217;s time zone and your applications time zone then you may see some incorrect times. I believe this is because you&#8217;ll be storing local times and the Rails app will be trying to convert them to local &#8211; a double conversion. So be careful.&lt;/p&gt;


	&lt;h2&gt;References&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://ryandaigle.com/articles/2008/1/25/what-s-new-in-edge-rails-easier-timezones&quot;&gt;What&#8217;s New in Edge Rails: Easier Timezones&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/&quot;&gt;Rails 2.1 Time Zone Support: An Overview&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://metautonomo.us/2008/06/02/updating-mysql-datetimes-for-rails-21-time-zones/&quot;&gt;Updating MySQL DATETIMEs for Rails 2.1 Time Zones&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-13:697</id>
    <published>2008-09-13T21:47:00Z</published>
    <updated>2008-09-13T22:32:44Z</updated>
    <category term="Software"/>
    <category term="Startup"/>
    <category term="quick tip"/>
    <category term="slicehost"/>
    <category term="timezone"/>
    <link href="http://millarian.com/2008/9/13/quick-tip-setting-time-zone-on-ubuntu-hardy" rel="alternate" type="text/html"/>
    <title>Quick Tip: Setting time zone on Ubuntu Hardy</title>
<content type="html">
            &lt;p&gt;I&#8217;ve been pretty enamored with &lt;a href=&quot;http://slicehost.com&quot;&gt;SliceHost&lt;/a&gt; recently. They make it very easy to setup a slice, configure it and get your product deployed quickly (I&#8217;m down to 30 min). I hadn&#8217;t noticed until just recently that I&#8217;ve never set a time zone on any slice I&#8217;ve configured. So, here&#8217;s how you do it, simple and easy.&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; into your slice&lt;/li&gt;
		&lt;li&gt;Run this command: &lt;code&gt;sudo dpkg-reconfigure tzdata&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Select your geographic area and location&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;That&#8217;s it, hope it helps!&lt;/p&gt;


	&lt;p&gt;If you want your own slice, consider using my &lt;a href=&quot;https://manage.slicehost.com/customers/new?referrer=23bdbe98ed4c7a89f27b83bb9ab7bf1a&quot;&gt;Slicehost referral link&lt;/a&gt;. Thanks!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-05:660</id>
    <published>2008-09-05T08:06:00Z</published>
    <updated>2008-09-05T08:08:10Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="nginx"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <link href="http://millarian.com/2008/9/5/nginx-405-not-allowed-error" rel="alternate" type="text/html"/>
    <title>Nginx 405 Not Allowed Error</title>
<content type="html">
            &lt;h2&gt;405 Not Allowed&lt;/h2&gt;


	&lt;p&gt;So, I got this error today and it took me a few minutes to track down why. Seems like the kind of thing that might be interesting to people. I&#8217;m using nginx on a project and this error was being thrown by nginx, not by Rails.  What could be the cause?&lt;/p&gt;


	&lt;h3&gt;Nginx configuration and &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;Do you have something in your nginx config file that looks like this?&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;if (-f $request_filename) {
  break;
}&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Basically, render an existing, static file directly, aka. bypass Rails. This is great, we don&#8217;t incur the overhead of hitting Rails for static files, including cached files, right?  Wrong.&lt;/p&gt;


	&lt;p&gt;You see, with &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;, your &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; will be the same for a &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; to create&lt;/strong&gt; as it will for a &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; to index&lt;/strong&gt;.  For example, viewing the users index and creating a user:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;GET  /users &amp;lt;= user's index
POST /users &amp;lt;= create a user&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;See the problem?&lt;/p&gt;


	&lt;p&gt;That&#8217;s right, if you cache the user&#8217;s index using a technique like &lt;code&gt;caches_page&lt;/code&gt; then you have a static file (e.g., users.html) that matches regardless of the &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; method. Therefore, it will bypass rails and attempt to serve the static file on a &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; request, resulting in a 405 error. Whew!&lt;/p&gt;


	&lt;h3&gt;Caching with nginx&lt;/h3&gt;


	&lt;p&gt;So what do you do? I don&#8217;t know. But this is what I did and I hope it helps.  Add the following to your nginx config prior to the serving of static files.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;if ($request_method != GET) {
  proxy_pass http://foobar;
  break;
}&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Uh, where &lt;code&gt;foobar&lt;/code&gt; is the name you specified in the upstream declaration in the nginx config. This should pass any non-GET request to Rails immediately since we don&#8217;t want to statically serve files for anything other than &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt;.&lt;/p&gt;


	&lt;h3&gt;References&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://brainspl.at/nginx.conf.txt&quot;&gt;Ezra&#8217;s nginx config&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.irseek.com/show.php?pageid=760ab7acd8d211dca6f7cf66f0d562a5&amp;amp;#38;hilite=405%20Not%20Allowed&quot;&gt;&lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt; conversation from February 6, 2008&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-09-02:517</id>
    <published>2008-09-02T01:11:00Z</published>
    <updated>2008-09-02T01:12:08Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="partials"/>
    <category term="quick tip"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <link href="http://millarian.com/2008/9/2/quick-tip-form-partials" rel="alternate" type="text/html"/>
    <title>Quick Tip: Form Partials</title>
<content type="html">
            &lt;p&gt;Partials are a great way to keep your view code separated logically.  Prior to Rails 2.1 if you wanted to reuse a form partial in, for example, a new and edit view, then you needed to pass the form into the partial somehow.&lt;/p&gt;


	&lt;p&gt;Given the following form partial:&lt;/p&gt;


	&lt;h3&gt;views/users/_form.html.erb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;div&amp;gt;
  &amp;lt;%= form.label :name -%&amp;gt;
  &amp;lt;%= form.text_field :name -%&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Pre-Rails 2.1&lt;/h2&gt;


	&lt;p&gt;You might consider passing the form in as a local, like so.&lt;/p&gt;


	&lt;h3&gt;views/users/new.html.erb or views/users/edit.html.erb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;% form_for @user do |form| -%&amp;gt;
  &amp;lt;%= render :partial =&amp;gt; 'form', :locals =&amp;gt; { :form =&amp;gt; form } -%&amp;gt;
&amp;lt;% end -%&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Rails 2.1&lt;/h2&gt;


	&lt;p&gt;There&#8217;s now a shortcut for this common method of rendering a form partial.&lt;/p&gt;


	&lt;h3&gt;views/users/new.html.erb or views/users/edit.html.erb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;% form_for @user do |form| -%&amp;gt;
  &amp;lt;%= render :partial =&amp;gt; form -%&amp;gt;
&amp;lt;% end -%&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Nice! Cleans things up a bit.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-08-31:487</id>
    <published>2008-08-31T22:49:00Z</published>
    <updated>2008-08-31T22:52:35Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="named_scope"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <link href="http://millarian.com/2008/8/31/quick-tip-named_scope" rel="alternate" type="text/html"/>
    <title>Quick Tip: named_scope</title>
<content type="html">
            &lt;p&gt;Have you ever found yourself writing queries like this?&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;User.find(:all, :conditions =&amp;gt; ['state = ? AND created_at &amp;gt; ? AND created_at &amp;lt;= ?', 'active', start_date, end_date], :limit =&amp;gt; 5)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I suppose you could refactor this into a custom finder that did the heavy lifting for you&#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;User.find_all_active_in_date_range(start_date, end_date)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;But what if you need that same query where the state is &#8216;pending&#8217;? Create another custom finder? Modify it so it takes another parameter for state?  Wouldn&#8217;t it be nice if you could create some kind of reusable snippet that could be chained together to create a custom finder?  Well, look no further. As of Rails 2.1, such a thing exists and it&#8217;s called named_scope.&lt;/p&gt;


	&lt;p&gt;Let&#8217;s refactor that code using named_scope.&lt;/p&gt;


	&lt;h3&gt;app/models/user.rb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class User &amp;lt; ActiveRecord::Base
  named_scope :active, :conditions =&amp;gt; { :state =&amp;gt; 'active' }
  named_scope :between, lambda { |starts, ends| { :conditions =&amp;gt; ['created_at &amp;gt; ? AND created_at &amp;lt;= ?', starts, ends] } }
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The &lt;code&gt;lambda&lt;/code&gt; is simply so we can accept parameters into the named scope call. Named scopes are easily chainable, so to get the desired query we can call:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;User.active.between(start_date, end_date)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Plus, if we want to add another condition, we just created another reusable named_scope and add it to the end.&lt;/p&gt;


	&lt;h3&gt;app/models/user.rb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class User &amp;lt; ActiveRecord::Base
  named_scope :active, :conditions =&amp;gt; { :state =&amp;gt; 'active' }
  named_scope :between, lambda { |starts, ends| { :conditions =&amp;gt; ['created_at &amp;gt; ? AND created_at &amp;lt;= ?', starts, ends] } }
  named_scope :limit, lambda { |num| { :limit =&amp;gt; num } }
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;And we have our original query. This is much more readable and maintainable than the previous code we were looking at. The named scopes can also be reused when another query comes up with those conditions.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;User.active.between(start_date, end_date).limit(5)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;There&#8217;s so much more you can do with named_scope, so check it out.&lt;/p&gt;


	&lt;h3&gt;References&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://ryandaigle.com/articles/2008/3/24/what-s-new-in-edge-rails-has-finder-functionality&quot;&gt;Has finder functionality&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://ryandaigle.com/articles/2008/8/20/named-scope-it-s-not-just-for-conditions-ya-know&quot;&gt;Named scope: It&#8217;s not just for conditions, ya know?&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://railscasts.com/episodes/108&quot;&gt;Railscasts: named_scope&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-08-27:453</id>
    <published>2008-08-27T04:22:00Z</published>
    <updated>2008-08-27T04:23:34Z</updated>
    <category term="Software"/>
    <category term="nano"/>
    <category term="quick tip"/>
    <category term="ssh"/>
    <link href="http://millarian.com/2008/8/27/quick-tip-ssh-backspace" rel="alternate" type="text/html"/>
    <title>Quick Tip: SSH Backspace</title>
<content type="html">
            &lt;p&gt;I just ran across this &lt;a href=&quot;http://jonathan.tron.name/2008/02/23/bad-key-bindings-over-ssh-from-a-mac&quot;&gt;informative post by Jonathan Tron&lt;/a&gt; that solved an annoyance I&#8217;ve had for a while: backspace not doing what I want when I use &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt;.&lt;/p&gt;


	&lt;h3&gt;Change your Terminal Preferences&lt;/h3&gt;


	&lt;ol&gt;
	&lt;li&gt;In Terminal, select Preferences | Settings | Advanced.&lt;/li&gt;
		&lt;li&gt;Select &#8216;Delete sends Ctrl-H&#8217;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;You may need to do this again if you change your terminal style.&lt;/p&gt;


	&lt;h3&gt;Specify a setting for nano&lt;/h3&gt;


	&lt;ol&gt;
	&lt;li&gt;On your server open ~/.nanorc&lt;/li&gt;
		&lt;li&gt;Add &#8216;set rebinddelete&#8217;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;And now you should have backspace working correctly for at least a few things&#8230;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-08-27:452</id>
    <published>2008-08-27T03:39:00Z</published>
    <updated>2008-08-27T03:39:49Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="quick tip"/>
    <category term="rails"/>
    <category term="routes"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <link href="http://millarian.com/2008/8/27/quick-tip-route-associations" rel="alternate" type="text/html"/>
    <title>Quick Tip: Route Associations</title>
<content type="html">
            &lt;p&gt;Are you used to writing your routes like this?&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;map.resources :notes do |notes|
    notes.resource  :author
    notes.resources :comments
    notes.resources :attachments
  end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Don&#8217;t fret, there may be hope for you yet.  For these simple routes you can use the &lt;code&gt;has_one&lt;/code&gt; or &lt;code&gt;has_many&lt;/code&gt; route association options.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;has_one &#8211; use it for a singleton resource&lt;/li&gt;
		&lt;li&gt;has_many &#8211; use it for plural resources&lt;/li&gt;
	&lt;/ul&gt;


&lt;h3&gt;Refactored routes&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;map.resources :notes, :has_one =&amp;gt; :author, :has_many =&amp;gt; [:comments, :attachments]&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Give it a try!&lt;/p&gt;


	&lt;p&gt;Keep in mind I said &lt;em&gt;simple&lt;/em&gt;. If you&#8217;re doing something more complex they might not be the best choice.&lt;/p&gt;


&lt;h3&gt;Additional Resources&lt;/h3&gt;

	&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://api.rubyonrails.org/classes/ActionController/Resources.html&quot;&gt;Module ActionController::Resources&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://millarian.com/">
    <author>
      <name>curtis</name>
    </author>
    <id>tag:millarian.com,2008-08-25:421</id>
    <published>2008-08-25T05:51:00Z</published>
    <updated>2008-08-26T04:51:08Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Software"/>
    <category term="capistrano"/>
    <category term="quick tip"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby on rails"/>
    <category term="ssh"/>
    <link href="http://millarian.com/2008/8/25/quick-tip-capistrano-ssh-ports" rel="alternate" type="text/html"/>
    <title>Quick Tip: Capistrano SSH Ports</title>
<content type="html">
            &lt;p&gt;If you have changed the &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; port number on your server, then you need to let Capistrano know how to connect.  Luckily, it&#8217;s pretty easy.&lt;/p&gt;


	&lt;p&gt;Add the following to your deployment file, replacing 8888 with your port number.&lt;/p&gt;


	&lt;h3&gt;config/deploy.rb&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;ssh_options[:port] = 8888&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This will apply that port number to connections made by Capistrano. If you need to specify the port for each server (app, web, db) then tack it on to the end of their declarations.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;role :app, &quot;65.74.169.199:8030&quot; 
role :web, &quot;65.74.169.199:8031&quot; 
role :db,  &quot;65.74.169.199:8032&quot;, :primary =&amp;gt; true&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I haven&#8217;t verified that one, but it supposedly works. &lt;strong&gt;Happy deployments!&lt;/strong&gt;&lt;/p&gt;
          </content>  </entry>
</feed>
