<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>André Arko</title>
 <link href="http://andre.arko.net/atom.xml" rel="self"/>
 <link href="http://andre.arko.net/"/>
 <updated>2012-01-24T09:23:42-08:00</updated>
 <id>http://andre.arko.net/</id>
 <author>
   <name>André Arko</name>
   <email>andre@arko.net</email>
 </author>

 
 <entry>
   <title>Fix newrelic.yml symlink errors on Engine Yard</title>
   <link href="http://andre.arko.net/2012/01/24/fix-newrelicyml-symlink-errors-on-engine-yard/"/>
   <updated>2012-01-24T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2012/01/24/fix-newrelicyml-symlink-errors-on-engine-yard</id>
   <content type="html">&lt;p&gt;Perhaps you, like me, occasionally deploy Ruby applications to [Engine Yard Cloud][ey]. And perhaps you, also like me, use the lovely [NewRelic][nr] analytics package provided to all Engine Yard customers. If you do, you have probably noticed that the [&lt;code&gt;newrelic_rpm&lt;/code&gt; gem][rpm] complains in development if you do not have a &lt;code&gt;config/newrelic.yml&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Naively, I created this file and added it to git, thinking that that would make the warnings go away and make everything wonderful. For a short time, I even thought it had. But then I noticed that every time I deployed my application, the deploy output contained a new error message. This error message repeated several times, possibly even once per server that I was deploying onto, and made me very sad. The error looks like this in the deploy output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~&amp;gt; Symlink other shared config files
ln: creating symbolic link/data/appname/releases/3000102030405/config/newrelic.yml': File exists
~&amp;gt; Symlink mongrel_cluster.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Today, I finally figured out how to stop that error from appearing. Logically enough, the abstract idea is to just remove the &lt;code&gt;newrelic.yml&lt;/code&gt; file before the engineyard gem attempts to create a symlink with the same name. In practice, that is tougher than it sounds. It turns out that the &amp;ldquo;Symlink other shared config files&amp;rdquo; step takes place very early in the deploy process.&lt;/p&gt;

&lt;p&gt;I first tried the &lt;code&gt;before_symlink.rb&lt;/code&gt; hook, but that refers to when the release directory is symlinked to &lt;code&gt;current&lt;/code&gt;. That is much too late in the deploy process to fix this. Next, I tried the &lt;code&gt;before_migrate.rb&lt;/code&gt; hook, which is suggested in the [deploy hook documentation][doc] for people who are confused by the symlink hook. That wasn&amp;rsquo;t early enough either. I finally discovered the &lt;code&gt;after_bundle.rb&lt;/code&gt; hook while perusing the docs again, and that worked! So here is the code you should add to &lt;code&gt;deploy/after_bundle.rb&lt;/code&gt; in your application:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;# remove the NewRelic config to avoid a warning when it is symlinked
run &amp;ldquo;rm -f #{release_path}/config/newrelic.yml&amp;rdquo;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;rsquo;s it. Once the &lt;code&gt;after_bundle.rb&lt;/code&gt; file is checked in to your repo, your deploys should be warning free.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Repeated headers and Ruby web servers</title>
   <link href="http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers/"/>
   <updated>2011-12-26T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers</id>
   <content type="html">&lt;p&gt;A few weeks ago, I ran into an interesting problem with my Rails app. For some reason, the &lt;code&gt;request.remote_ip&lt;/code&gt; value inside my app didn&amp;rsquo;t contain the correct value. Instead, it simply contained the internal address of the EC2 instance I was using as a load balancer. I started noticing the problem when I set up a stack consisting of stunnel, HAProxy, Nginx, and Passenger.&lt;/p&gt;

&lt;p&gt;After a huge amount of testing (and checking a lot of headers), I discovered that the raw request being delivered to Passenger contained two separate X-Forwarded-For headers. At first, I thought the problem must be in Rack, overriding the value in the headers hash with a new value when it saw the same header a second time. I dove into the Rack code thinking I had just found a giant bug&amp;hellip; but the Rack code seemed to be doing the right thing, so I had to keep looking.&lt;/p&gt;

&lt;p&gt;I was especially confused by the way that my local development environment (using the Pow server) didn&amp;rsquo;t seem to have the problem. Eventually, I figured out that the problem isn&amp;rsquo;t Rack. According to the relevant HTTP spec (namely RFC 2616), two headers can simply be interpreted as a single header with two comma-separated values. Many Rack servers do this, and so Rack gets a single header with two values. Some Rack servers don&amp;rsquo;t do this, and apps running in those servers merely see the value of the last header in the request.&lt;/p&gt;

&lt;p&gt;In order to narrow things down, I tested all of the current production-use Rack servers I could think of off the top of my head. Here&amp;rsquo;s what I found:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Pow 
$ curl -s -H&amp;quot;X-Header: 1&amp;quot; -H&amp;quot;X-Header: 2&amp;quot; app.dev/headers | grep X_HEADER
HTTP_X_HEADER: 1, 2

# Unicorn
$ curl -s -H&amp;quot;X-Header: 1&amp;quot; -H&amp;quot;X-Header: 2&amp;quot; localhost:8080/headers | grep X_HEADER
HTTP_X_HEADER: 1,2

# Thin
$ curl -s -H&amp;quot;X-Header: 1&amp;quot; -H&amp;quot;X-Header: 2&amp;quot; localhost:3000/headers | grep X_HEADER
HTTP_X_HEADER: 2

# Passenger-standalone (which is nginx+passenger)
$ curl -s -H&amp;quot;X-Header: 1&amp;quot; -H&amp;quot;X-Header: 2&amp;quot; localhost:3000/headers | grep X_HEADER
HTTP_X_HEADER: 2

# HAProxy+nginx+passenger
$ curl -s -H&amp;quot;X-Header: 1&amp;quot; -H&amp;quot;X-Header: 2&amp;quot; app.prod/headers | grep X_HEADER
HTTP_X_HEADER: 2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see in the results above, Pow and Unicorn both combine repeated headers into a comma-separated list that is passed to Rack. Thin and Passenger, on the other hand, take a simple &amp;ldquo;last header wins&amp;rdquo; approach.&lt;/p&gt;

&lt;p&gt;In the end, I wound up changing my stack to use Unicorn instead of Passenger, so that I could get the values from all of the headers instead of just the last one. Hopefully the next guy with the same problem will just find this when they search, and save them from having to repeat that testing work.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Make Rails 3 stop trying to serve HTML</title>
   <link href="http://andre.arko.net/2011/12/10/make-rails-3-stop-trying-to-serve-html/"/>
   <updated>2011-12-10T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2011/12/10/make-rails-3-stop-trying-to-serve-html</id>
   <content type="html">&lt;p&gt;Something kind of surreal happened today. I noticed that one of my Rails 3 apps was logging &lt;code&gt;ActionView::MissingTemplate&lt;/code&gt; errors. When I looked into it, the error was coming from an HTML template that didn&amp;rsquo;t exist. The problem was, that action wasn&amp;rsquo;t supposed to serve HTML at all, ever. I had even dutifully called &lt;code&gt;clear_respond_to; respond_to :xml&lt;/code&gt; in my controller, and I thought that would fix everything. Unfortunately, googling and checking Stack Overflow turned up nothing relevant to this particular version of the error, so I decided I had better just dig in.&lt;/p&gt;

&lt;p&gt;The request was strange. It came from an IP address in China, and claimed to be asking for &lt;code&gt;http://www.google.com/index.html&lt;/code&gt;, even though the request was sent to my server&amp;rsquo;s IP. After some experimentation, I figured out that there was a problem with my routes: Rails 3 defaults to allowing any regular request to have its format specified with a file extension, like &lt;code&gt;.html&lt;/code&gt;. So even though I was responding with XML when the format wasn&amp;rsquo;t specified, my controller was trying to return HTML when it was explicitly requested.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;resource&lt;/code&gt; routes allow you to supply a &lt;code&gt;:format&lt;/code&gt; parameter that sets the format for all requests to that resource. I thought that regular routes had a &lt;code&gt;:format&lt;/code&gt; parameter that worked the same way. It turns out they don&amp;rsquo;t. Regular routes (set by calling &lt;code&gt;match&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;root&lt;/code&gt;, and the like) will take &lt;code&gt;:format =&amp;gt; :xml&lt;/code&gt; as an argument. But it turns out that argument is just a shortcut for &lt;code&gt;:defaults =&amp;gt; {:format =&amp;gt; :xml}&lt;/code&gt;. So while the format was XML if you didn&amp;rsquo;t ask for anything else, explicitly requesting HTML would still get you HTML.&lt;/p&gt;

&lt;p&gt;The solution turned out to be adding &lt;code&gt;:constraints =&amp;gt; {:format =&amp;gt; :xml}&lt;/code&gt; to the route as well as setting the default format. That means that the routes you still want, like &lt;code&gt;/index&lt;/code&gt; and &lt;code&gt;/index.xml&lt;/code&gt;, will still work. Even better, it will reject requests for &lt;code&gt;/index.html&lt;/code&gt; as an invalid route, since the format no longer matches the constraint. Problem solved, but man that took more work than I was expecting to figure out.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Change Postgres database owner</title>
   <link href="http://andre.arko.net/2011/12/06/change-postgres-database-owner/"/>
   <updated>2011-12-06T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2011/12/06/change-postgres-database-owner</id>
   <content type="html">&lt;p&gt;Since this took some digging to find, I&amp;rsquo;m just going to post it for posterity (and myself in the future):&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;UPDATE pg_class SET relowner = (SELECT oid 
    FROM pg_roles WHERE rolname = &amp;lsquo;$USER&amp;rsquo;) 
  WHERE relname IN (SELECT relname
    FROM pg_class, pg_namespace 
    WHERE pg_namespace.oid = pg_class.relnamespace
    AND pg_namespace.nspname = &amp;lsquo;public&amp;rsquo;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Change $USER to be the name of the user you want to be the new owner of the DB.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Use NewRelic RPM developer mode with Pow</title>
   <link href="http://andre.arko.net/2011/11/12/use-newrelic-rpm-developer-mode-with-pow/"/>
   <updated>2011-11-12T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2011/11/12/use-newrelic-rpm-developer-mode-with-pow</id>
   <content type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;echo &amp;lsquo;export NEWRELIC_DISPATCHER=pow&amp;rsquo; &amp;gt;&amp;gt; ~/.powconfig
echo &amp;lsquo;export POW_WORKERS=1&amp;rsquo; &amp;gt;&amp;gt; ~/.powconfig
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;What now?&lt;/h3&gt;

&lt;p&gt;I have used the excellent &lt;a href=&quot;http://www.fngtps.com/passenger-preference-pane&quot;&gt;Passenger Pane&lt;/a&gt; for years without complaint. But then I upgraded to Lion, and that disabled all of my apps' &lt;code&gt;.dev&lt;/code&gt; domains. Since the new local hotness seems to be &lt;a href=&quot;pow.cx&quot;&gt;Pow&lt;/a&gt;, I tried it. Lo and behold, my &lt;code&gt;.dev&lt;/code&gt; domains worked again!&lt;/p&gt;

&lt;p&gt;However, trouble was lurking in my newly-functional paradise. NewRelic developer mode was disabled in all my Pow-run processes! It turns out that the NewRelic RPM gem doesn&amp;rsquo;t include Pow on its list of known dispatchers. Googling around for a solution, I discovered that this was &lt;a href=&quot;https://twitter.com/#!/thomasfuchs/status/76920868302897152&quot;&gt;not a new problem&lt;/a&gt;, and it supposedly &lt;a href=&quot;http://stevendaniels.net/2011/04/pow-and-new-relic-rpm/&quot;&gt;already had a solution&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With hope in my heart, I tried the suggested solution of forcing developer mode to always be on. While that seemed to uselessly enable developer mode in the rails console, it still wasn&amp;rsquo;t working when I tried to load &lt;code&gt;/newrelic&lt;/code&gt;. Stymied, I gave up and moved on to other problems.&lt;/p&gt;

&lt;p&gt;A week later, I was browsing the NewRelic docs for something else, and discovered the &lt;a href=&quot;http://newrelic.com/docs/ruby/how-do-i-make-sure-the-ruby-agent-starts&quot;&gt;holy grail&lt;/a&gt;. The solution is incredibly simple: just tell NewRelic what your dispatcher is named in an environment variable. Since Pow has built-in support for setting environment variables, you can do this by adding just one line to the file &lt;code&gt;~/.powconfig&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export NEWRELIC_DISPATCHER=pow
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There is one other consideration. By default, Pow runs two workers per Rack app, balancing connections between them. That is not optimal for NewRelic development mode, where request statistics are simply kept in memory for each process. To work around this, you can simply instruct Pow to run only one worker for each app, and all your requests will go to the same process:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export POW_WORKERS=1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With that, and a quick &lt;code&gt;killall pow&lt;/code&gt;, NewRelic development mode was MINE YET AGAIN. And now I can get back to profiling my slow actions and sequel statements without the bother of running &lt;code&gt;rails server&lt;/code&gt;. Hurrah.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The request is doing WHAT?</title>
   <link href="http://andre.arko.net/2011/11/09/the-request-is-doing-what/"/>
   <updated>2011-11-09T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2011/11/09/the-request-is-doing-what</id>
   <content type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;

&lt;p&gt;Don&amp;rsquo;t use the &lt;code&gt;with_deleted&lt;/code&gt; method added by &lt;a href=&quot;https://github.com/goncalossilva/rails3_acts_as_paranoid&quot;&gt;rails3_acts_as_paranoid&lt;/a&gt;. Seriously. Don&amp;rsquo;t.&lt;/p&gt;

&lt;h3&gt;launch time!&lt;/h3&gt;

&lt;p&gt;A little over a week ago, Plex launched the site I&amp;rsquo;ve been working on, &lt;a href=&quot;https://my.plexapp.com&quot;&gt;myPlex&lt;/a&gt;. At the same time, we &lt;a href=&quot;http://elan.plexapp.com/2011/10/29/plex-v0-9-5-brave-new-world/&quot;&gt;launched&lt;/a&gt; updated Mac, iOS, and Android apps as well as new Windows and GoogleTV apps. It&amp;rsquo;s pretty damn cool, if I do say so myself, and a lot of people signed up and started using it.&lt;/p&gt;

&lt;h3&gt;uhoh&lt;/h3&gt;

&lt;p&gt;I noticed a problem, though &amp;mdash; one of the most common requests to the app was using tons of CPU and DB time. In order to keep up with demand, we had to keep adding additional hardware. It was very strange how disproportionately bad the slow action was, though. According to NewRelic, the average response time for other requests was 400ms, and this slow request was averaging 9,600ms. Totally crazy, right?&lt;/p&gt;

&lt;h3&gt;rails, how does it work&lt;/h3&gt;

&lt;p&gt;After employing some benchmarking, NewRelic in development mode, and a profiler, I eventually found several ways performance could be improved. The real killer, though, was a specific type of query: &lt;code&gt;SELECT * FROM table_name&lt;/code&gt;. Every row in an entire table was getting queried, more than once per request! &amp;ldquo;How is this possible&amp;rdquo;, I thought. &amp;ldquo;Doesn&amp;rsquo;t Rails have a query cache?&amp;rdquo;&lt;/p&gt;

&lt;h3&gt;the thrilling conclusion&lt;/h3&gt;

&lt;p&gt;Well, as it turns out, the query cache can be overridden by the &lt;code&gt;#reload&lt;/code&gt; method. And when I checked the scary query backtraces, I ran into a method provided by the rails3_acts_as_paranoid gem:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def with_deleted
  self.unscoped.reload
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So every time that I tried to include items that were marked deleted in a query using scopes, &lt;code&gt;with_deleted&lt;/code&gt; would fire off a full-table select before running my query! ZOMG.&lt;/p&gt;

&lt;h3&gt;aftermath&lt;/h3&gt;

&lt;p&gt;Happily, between that fix and several other tweaks and indexes, I was able to speed up the slow request! How much, you ask? Well, the average response time on that slow API action went from 12,792ms to 1,137ms. Oh, and I was able to cut the amount of hardware serving the site by 90%. That&amp;rsquo;s always nice.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OmniFocus location-based alerts</title>
   <link href="http://andre.arko.net/2011/10/12/omnifocus-location-based-alerts/"/>
   <updated>2011-10-12T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/10/12/omnifocus-location-based-alerts</id>
   <content type="html">&lt;p&gt;iOS 5 is released! While I&amp;rsquo;m happy about a lot of new features, the one that has me the most excited at the moment is background location monitoring. Apps can now register with the OS to get notified when your location has significantly changed. The most obvious example of this, included with iOS 5 itself, is the new Reminders app. When you create a todo item, you can add a location to the item, and tell the app to alert you either when you arrive at or leave that location. It&amp;rsquo;s pretty cool.&lt;/p&gt;

&lt;p&gt;OmniFocus 1.12 takes the new API and integrates it beautifully. In previous versions, you could already assign a location or search (like &amp;ldquo;walgreens OR CVS&amp;rdquo;) to a context. Once you&amp;rsquo;ve set up locations, OmniFocus can provide you with a map showing nearby places with tasks assigned.&lt;/p&gt;

&lt;p&gt;Now that you can add alerts, though, things get really interesting. You can get an alert two ways: when you arrive at a location or when you leave a location. Arrival alerts are great when you need something from a specific place, or questions to ask someone in person when you see them. Departure alerts are great for general errands that you don&amp;rsquo;t want to think about until you go out.&lt;/p&gt;

&lt;p&gt;You can also set how close you need to be to trigger the alert. The distance options are about 500 feet, 1500 feet, and 6 miles. The closest option is great for home, work, or any context that depends on you being at a specific street address. The middle option is useful for grouping stores in a single neighborhood, reminding you that you also wanted to do something a few blocks away. The 6 mile option is aimed at entire cities. It lets you do things like remind yourself of everything you wanted to do when you arrive somewhere you don&amp;rsquo;t visit that often.&lt;/p&gt;

&lt;p&gt;Although I&amp;rsquo;ve only been using them for a few days, I&amp;rsquo;ve already found the location-based alerts very useful. It just makes me happy to see my grocery list pop up automatically when I pull into the parking lot.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>'From' address keyboard shortcuts in Lion</title>
   <link href="http://andre.arko.net/2011/09/26/from-address-keyboard-shortcuts-in-lion/"/>
   <updated>2011-09-26T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/09/26/from-address-keyboard-shortcuts-in-lion</id>
   <content type="html">&lt;p&gt;Mac OS X contains a truly helpful feature in the Keyboard system preference pane that allows you to set a keyboard shortcut for any menu item in any application by name. In Snow Leopard, I used this feature to add keyboard shortcuts for selecting the &amp;ldquo;From&amp;rdquo; address while I was composing an email in Mail.app. I had configured it so that ⌃1, ⌃2, etc. would switch between my personal, work, and other email accounts. The menu items in Mail.app are titled things like &amp;ldquo;Andre Arko &lt;a href=&quot;mailto:andre@arko.net&quot;&gt;andre@arko.net&lt;/a&gt;&amp;rdquo;, so it was easy to assign a keyboard shortcut to that item by name. Unfortunately, Lion&amp;rsquo;s Keyboard preference pane adds a bug with menu item titles that contain angle brackets. The bug escapes angle brackets incorrectly when inserting them into the application&amp;rsquo;s preferences plist file. As a result, the keyboard shortcuts are never activated.&lt;/p&gt;

&lt;p&gt;After some manual investigation, I figured out that Mail&amp;rsquo;s plist file was getting entries that looked like &amp;ldquo;\eAndre Arko &amp;lt;andre@arko.net\e&amp;rdquo; instead. I &lt;a href=&quot;http://openradar.appspot.com/radar?id=1288404&quot;&gt;filed a bug with Apple&lt;/a&gt;, but I haven&amp;rsquo;t gotten a response, so I figure I&amp;rsquo;m stuck with it for a while. With some experimentation, I discovered that it&amp;rsquo;s possible to manually edit the plist to fix the shortcuts, but the bug is re-triggered whenever you open the Keyboard prefpane. To automate fixing the Mail shortcuts after changing other settings, I wrote a ruby script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/env ruby
require &amp;lsquo;rubygems&amp;rsquo;
require &amp;lsquo;plist&amp;rsquo;

path = File.expand_path(&amp;ldquo;~/Library/Preferences/com.apple.mail.plist&amp;rdquo;)
# Convert to XML plist so the plist gem can read it
system(&amp;ldquo;plutil -convert xml1 &amp;lsquo;#{path}&amp;rsquo;&amp;rdquo;)

# Parse the plist into a hash
prefs = Plist.parse_xml(path)

# Gsub away the buggy values from the Lion Keyboard.prefpane
user_keys = prefs[&amp;ldquo;NSUserKeyEquivalents&amp;rdquo;]
user_keys.keys.each do |key|
  shortcut = user_keys.delete(key)
  fixed_key = key.gsub(/\e(.*?)\e/, &amp;lsquo;\1&amp;gt;&amp;rsquo;)
  user_keys[fixed_key] = shortcut
end

# Write out the fixed plist as XML
File.open(path, &amp;ldquo;w&amp;rdquo;){|f| f.write(prefs.to_plist) }

# Convert the XML plist back to binary for Mail.app
system(&amp;ldquo;plutil -convert binary1 &amp;lsquo;#{path}&amp;rsquo;&amp;rdquo;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I also posted &lt;a href=&quot;https://gist.github.com/1131361&quot;&gt;the code as a gist&lt;/a&gt; if you&amp;rsquo;d like to fork it or comment on it. So far, there is &lt;a href=&quot;https://gist.github.com/1225867&quot;&gt;a fork that adds support for Sparrow&lt;/a&gt;, the standalone Gmail client, as well.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RVM system gems without sudo</title>
   <link href="http://andre.arko.net/2011/09/04/RVM-system-gems-without-sudo/"/>
   <updated>2011-09-04T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/09/04/RVM-system-gems-without-sudo</id>
   <content type="html">&lt;p&gt;Somewhat unusually (I guess?) I sometimes use system Ruby on OS X. I use RVM for other versions of Ruby, like 1.9.2 and JRuby. System Ruby is still the easiest Ruby version to use on OS X, however. Furthermore, because it is so common with developers, I need to make sure that each new version of &lt;a href=&quot;https://github.com/carlhuda/bundler&quot;&gt;Bundler&lt;/a&gt; is compatible with OS X system Ruby.&lt;/p&gt;

&lt;p&gt;System Ruby has a problem, though: it is hardcoded to install gem executables into &lt;code&gt;/usr/bin&lt;/code&gt;. This is very awkward because it means you need to run &lt;code&gt;sudo gem install&lt;/code&gt; so Rubygems can install the binaries. A less awkward setup (IMHO), is to leave /Library/Ruby/Gems/1.8 owned by the staff group, as it is in a fresh OS X install. In order to make that setup work, however, you have to override the Rubygems binary directory by adding &lt;code&gt;-n/Library/Ruby/Gems/1.8/bin&lt;/code&gt; to your &lt;code&gt;~/.gemrc&lt;/code&gt; file, or pass that to the &lt;code&gt;gem&lt;/code&gt; command every time you run it. Once you add that directory to the front of your &lt;code&gt;$PATH&lt;/code&gt; environment variable, you&amp;rsquo;re set. Install gems without sudo, and everything is good.&lt;/p&gt;

&lt;p&gt;This is all well and good until you install RVM and it tries to install gems for other versions of Ruby. Those other versions of Ruby will honor your &lt;code&gt;~/.gemrc&lt;/code&gt; file and install your gem binaries into the system gems binary directory. In order to work around this, I have written an after_use hook for RVM. It redefines the &lt;code&gt;gem&lt;/code&gt; function that RVM sets up when you change between Ruby versions to include the -n option or not, depending on the version of Ruby that you have switched to. Here&amp;rsquo;s the code:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;#!/usr/bin/env bash

if [ $rvm_ruby_string == &amp;ldquo;system&amp;rdquo; ]; then
  function gem {
    local result
    command gem &amp;ldquo;-n/Library/Ruby/Gems/1.8/bin $@&amp;rdquo; ; result=&amp;ldquo;$?&amp;rdquo;
    hash -r
    return $result
  }
else
  function gem {
    local result
    command gem &amp;ldquo;$@&amp;rdquo; ; result=&amp;ldquo;$?&amp;rdquo;
    hash -r
    return $result
  }
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In order to install it, run these commands:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;curl http://bit.ly/after_use_system_binstubs &amp;gt; ~/.rvm/hooks/after_use_system_binstubs
chmod +x ~/.rvm/hooks/after_use_system_binstubs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once the hook is installed, RVM will redefine the &lt;code&gt;gem&lt;/code&gt; function to include the -n option for system gem installs, and not include the -n option for non-system gem installs. It&amp;rsquo;s really pretty nice, since you no longer have to use &lt;code&gt;sudo&lt;/code&gt; to install any gems, system or not.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>View Github issues opened by a user</title>
   <link href="http://andre.arko.net/2011/08/29/view-github-issues-opened-by-a-user/"/>
   <updated>2011-08-29T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/08/29/view-github-issues-opened-by-a-user</id>
   <content type="html">&lt;p&gt;Since I keep wanting this and forgetting how to do it, I&amp;rsquo;m posting it for posterity (and myself, later). In Github Issues 2.0, there is an undocumented URL that lets you see all the tickets opened by a specific person:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://github.com/owner/reponame/issues/created_by/user
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;rsquo;ve been using it for things like &lt;a href=&quot;http://github.com/carlhuda/bundler/issues/created_by/indirect&quot;&gt;Bundler issues I have opened&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>PID numbers for Rails 3 logs</title>
   <link href="http://andre.arko.net/2011/08/18/pid-numbers-for-rails-3-logs/"/>
   <updated>2011-08-18T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/08/18/pid-numbers-for-rails-3-logs</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;: Copy &lt;a href=&quot;https://gist.github.com/1091527&quot;&gt;the code&lt;/a&gt; into &lt;code&gt;lib/pid_logger.rb&lt;/code&gt; and edit your &lt;code&gt;application.rb&lt;/code&gt;. Now your Rails 3 app has PID numbers on each log line. Tada.&lt;/p&gt;

&lt;p&gt;I recently signed up for &lt;a href=&quot;http://papertrailapp.com&quot;&gt;Papertrail&lt;/a&gt;, and starting sending all of my production Rails logs to a single consolidated place for tailing and searching. Papertrail is pretty great, but having all my logs in one place revealed a pretty big problem with default Passenger configurations. All the Passenger processes log to the same &lt;code&gt;production.log&lt;/code&gt; file. This means that log lines from completely unrelated requests can get intermingled, making it impossible to tell which log lines belong to which requests. This makes the production log nearly useless for reconstructing what happened while investigating something.&lt;/p&gt;

&lt;p&gt;A typical solution to this issue, especially for Mongrel or Unicorn setups, is to have each Rails process log to a separate file. Since I&amp;rsquo;m using Passenger, though, I came up with a simpler solution: prepend the PID of the current process to each log line. This means I can use Papertrail to filter the production log by PID number, and then I can focus on a single request as needed.&lt;/p&gt;

&lt;p&gt;There are a lot of patches floating around the internet that change how Rails logs things, and I wasn&amp;rsquo;t feeling great about copying someone else&amp;rsquo;s monkepatch into my app. Ultimately, I wrote a subclass of ActiveSupport::BufferedLogger that uses some of the tricks from patches floating around the web and some of my own code. Once you install it, you&amp;rsquo;ll be able to see both the PID and the log level of each line written to the production logs, greatly improving things. I suggest putting this file into &lt;code&gt;lib/pid_logger.rb&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# You must require this file in application.rb, above the Application
# definition, for this to work. For example:
#
#   # PIDs prepended to logs
#   if Rails.env.production?
#     require File.expand_path(&amp;lsquo;../../lib/pid_logger&amp;rsquo;, __FILE__)
#   end
#
#   module MyApp
#     class Application &amp;lt; Rails::Application

require &amp;lsquo;active_support/buffered_logger&amp;rsquo;

class PidLogger &amp;lt; ActiveSupport::BufferedLogger

  SEVERITIES = Severity.constants.sort_by{|c| Severity.const_get&amp;copy; }

  def add(severity, message = nil, progname = nil, &amp;amp;block)
    return if @level &amp;gt; severity
    message = (message || (block &amp;amp;&amp;amp; block.call) || progname).to_s
    # Prepend pid and severity to the written message
    log = &amp;ldquo;[#{$$}] #{SEVERITIES[severity]} #{message.gsub(/^\n+/, &amp;rdquo;)}&amp;ldquo;
    # If a newline is necessary then create a new message ending with a newline.
    log &amp;lt;&amp;lt; &amp;rdquo;\n&amp;quot; unless log[-1] == ?\n
    buffer &amp;lt;&amp;lt; log
    auto_flush
    message
  end

  class Railtie &amp;lt; ::Rails::Railtie
    initializer &amp;ldquo;swap in PidLogger&amp;rdquo; do
      Rails.logger = PidLogger.new(Rails.application.config.paths.log.first)
      ActiveSupport::Dependencies.logger = Rails.logger
      Rails.cache.logger = Rails.logger
      ActiveSupport.on_load(:active_record) do
        ActiveRecord::Base.logger = Rails.logger
      end
      ActiveSupport.on_load(:action_controller) do
        ActionController::Base.logger = Rails.logger
      end
      ActiveSupport.on_load(:action_mailer) do
        ActionMailer::Base.logger = Rails.logger
      end
    end
  end

end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;rsquo;ve also posted the code on Github &lt;a href=&quot;https://gist.github.com/1091527&quot;&gt;in a gist&lt;/a&gt;, for forking, commentary, and improvement. Thanks!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Fixing Mac Shutdown Delays</title>
   <link href="http://andre.arko.net/2011/08/07/fixing-mac-shutdown-delays/"/>
   <updated>2011-08-07T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/08/07/fixing-mac-shutdown-delays</id>
   <content type="html">&lt;h3&gt;or, How MySQL is broken on OS X&lt;/h3&gt;

&lt;p&gt;Ever since I saw James Edward Grey II &lt;a href=&quot;http://twitter.com/#!/JEG2/status/49261212801839104&quot;&gt;point out&lt;/a&gt; the delay at shutdown caused by having MySQL installed on OS X, it has bugged me. A lot. I even spent a few hours trying to figure out what was going on back then, but to no avail. The only thing I was able to figure out at the time was that running &lt;code&gt;launchctl unload com.mysql.mysqld.plist&lt;/code&gt; always took 20 seconds.&lt;/p&gt;

&lt;p&gt;This last week, however, I installed MySQL 5.5 on a new MacBook Air. The first thing I discovered is that it is &lt;a href=&quot;http://lightyearsoftware.com/2011/02/mysql-5-5-on-mac-os-x/&quot;&gt;deeply broken&lt;/a&gt;. Not only is the path to the shared library incomplete, the provided OS X StartupItem doesn&amp;rsquo;t work.&lt;/p&gt;

&lt;p&gt;Since the startup item was broken, I resolved to create a plist that would allow &lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html&quot;&gt;launchd&lt;/a&gt; to control MySQL. While I was creating and testing that plist, I discovered that &lt;code&gt;mysqld&lt;/code&gt; completely ignores interrupts, and will happily run forever while you press ⌃C to no avail. The only way to tell the server process to stop is to send it a &lt;code&gt;SIGTERM&lt;/code&gt;, via &lt;code&gt;kill&lt;/code&gt; or what have you. As I made that discovery, I suddenly developed a hunch that the shutdown delay was caused by the &lt;code&gt;mysqld&lt;/code&gt; process refusing to shut down when interrupted.&lt;/p&gt;

&lt;p&gt;After a bit of digging through the search results for &lt;code&gt;launchd 20 seconds&lt;/code&gt;, I discovered the &lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html&quot;&gt;launchd.plist&lt;/a&gt; man page. On that page, I learned about a completely new (to me) option: &lt;code&gt;ExitTimeOut&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ExitTimeOut &amp;lt;integer&amp;gt;
The amount of time launchd waits before sending a SIGKILL signal. The default value is 20 seconds. The value zero is interpreted as infinity.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The mention of a 20 second default stood out like a red flag to me, so I tried adding an entry to the MySQL plist that changed &lt;code&gt;ExitTimeOut&lt;/code&gt; to one second. As soon as I did that, &lt;code&gt;launchctl unload com.mysql.mysqld.plist&lt;/code&gt; took only one second to run. With great excitement, I tested out restarting my computer, and discovered that that single change completely resolved the long delays that had been irritating me.&lt;/p&gt;

&lt;p&gt;Here is the complete code for the plist, located at &lt;code&gt;/Library/LaunchDaemons/com.mysql.mysqld.plist&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&amp;ldquo;1.0&amp;rdquo; encoding=&amp;ldquo;UTF-8&amp;rdquo;?&amp;gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;ldquo;&amp;ndash;//Apple//DTD PLIST 1.0//EN&amp;rdquo;
&amp;ldquo;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;rdquo;&amp;gt;
&amp;lt;plist version=&amp;ldquo;1.0&amp;rdquo;&amp;gt;
&amp;lt;dict&amp;gt;
    &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;com.mysql.mysqld&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;Program&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/usr/local/mysql/bin/mysqld_safe&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;UserName&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;_mysql&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;WorkingDirectory&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/usr/local/mysql&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ExitTimeOut&amp;lt;/key&amp;gt;
    &amp;lt;integer&amp;gt;1&amp;lt;/integer&amp;gt;
&amp;lt;/dict&amp;gt;
&amp;lt;/plist&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you want to load it without restarting your machine, use the command &lt;code&gt;sudo launchctl load /Library/LaunchDaemons/com.mysql.mysqld.plist&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Safari extensions in Lion</title>
   <link href="http://andre.arko.net/2011/07/23/safari-extensions-in-lion/"/>
   <updated>2011-07-23T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/07/23/safari-extensions-in-lion</id>
   <content type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;

&lt;p&gt;Install &lt;a href=&quot;https://github.com/rs/SafariOmnibar&quot;&gt;Safari Omnibar&lt;/a&gt; from the provided &lt;a href=&quot;https://github.com/downloads/rs/SafariOmnibar/Safari%20Omnibar-1.1.pkg&quot;&gt;installer package&lt;/a&gt;, and then download &lt;a href=&quot;http://cl.ly/3o023c4026201S060p27&quot;&gt;my customized version&lt;/a&gt; and install it to &lt;code&gt;/Library/Application Support/SIMBL/Plugins/&lt;/code&gt;. Edit keywords in the file &lt;code&gt;SafariOmnibar.bundle/Resources/SearchProviders.plist&lt;/code&gt;. Tada, now you have a single location bar for URLs, searches, and keyword searches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: So as of today, you can just &lt;a href=&quot;https://github.com/downloads/rs/SafariOmnibar/Safari%20Omnibar-1.2.pkg&quot;&gt;install SafariOmnibar 1.2&lt;/a&gt; now and then update SearchProviders.plist yourself. If you&amp;rsquo;d like to, you can &lt;a href=&quot;https://gist.github.com/1101586&quot;&gt;copy my plist&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Install &lt;a href=&quot;http://hoyois.github.com/safariextensions/clicktoplugin/&quot;&gt;the Safari extension version&lt;/a&gt; of ClickToFlash, get video downloading for free.&lt;/p&gt;

&lt;h3&gt;The state of Safari extensions in Lion&lt;/h3&gt;

&lt;p&gt;I have been a dedicated user of &lt;a href=&quot;http://haoli.dnsalias.com/saft/&quot;&gt;Saft&lt;/a&gt;, &lt;a href=&quot;http://alexstaubo.github.com/keywurl/&quot;&gt;Keywurl&lt;/a&gt;, &lt;a href=&quot;http://glimmerblocker.org/&quot;&gt;GlimmerBlocker&lt;/a&gt;, and &lt;a href=&quot;http://clicktoflash.com/&quot;&gt;ClickToFlash&lt;/a&gt; for years. When I upgraded to &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Lion&lt;/a&gt;, however, I discovered that none of them work.&lt;/p&gt;

&lt;p&gt;Saft mainly provided automatic restoration of open windows when quitting and restarting Safari. Keywurl provided searching directly in the location bar, and keyword searches to limit the search to specific sites. GlimmerBlocker provided ad-blocking and page transformations like a &amp;ldquo;download video&amp;rdquo; link on YouTube pages.&lt;/p&gt;

&lt;p&gt;When I upgraded to Lion, none of them worked.&lt;/p&gt;

&lt;p&gt;GlimmerBlocker was updated pretty quickly, but it turns out that YouTube download links download corrupted video files. Keywurl and Saft haven&amp;rsquo;t been updated yet, and will probably take time. ClickToFlash likewise only supports Snow Leopard, and tickets reporting issues with Lion haven&amp;rsquo;t been responded to for months. So, we need replacements.&lt;/p&gt;

&lt;p&gt;Happily, Saft&amp;rsquo;s biggest feature (restore open windows) is now built in to Safari on Lion. Theoretically, GlimmerBlocker supports keyword searches in the location bar, but I couldn&amp;rsquo;t figure out how to configure it and eventually gave up. I was really excited to find &lt;a href=&quot;https://github.com/rs/SafariOmnibar&quot;&gt;SafariOmnibar&lt;/a&gt;, which merges the search and location bars into a single bar that supports both. At that point, I only needed keyword searching to replace Keywurl completely.&lt;/p&gt;

&lt;p&gt;I was pretty excited to discover that keyword searches were already implemented in git, so I checked it out and compiled &lt;a href=&quot;http://cl.ly/3o023c4026201S060p27&quot;&gt;my own release&lt;/a&gt; of version 1.1 with keyword support. Then my only task was to import the Keywurl keyword plist into the SafariOmnibar keyword plist format. Now I have a complete replacement for Keywurl, albeit without a UI for adding new keywords.&lt;/p&gt;

&lt;p&gt;Unable to discover any obvious options for downloading YouTube videos with a quick Google search, I gave up on that and went to replace ClickToFlash. There is &lt;a href=&quot;http://hoyois.github.com/safariextensions/clicktoplugin/&quot;&gt;a Safari extension version&lt;/a&gt; that works quite well in Safari 5.1. It not only replaces Flash videos with HTML5 videos if possible, it even provides a &amp;ldquo;Download video&amp;rdquo; contextual menu item on those videos.&lt;/p&gt;

&lt;p&gt;So at this point I&amp;rsquo;m pretty happy. The combination of SafariOmnibar and ClickToFlash replaced all of the extension functionality that I had previously been using, albeit coming from entirely different software. Woo.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Smoothing Rails development in Bash</title>
   <link href="http://andre.arko.net/2011/07/16/smoothing-rails-development-in-bash/"/>
   <updated>2011-07-16T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/07/16/smoothing-rails-development-in-bash</id>
   <content type="html">&lt;p&gt;This post covers a few ways that I&amp;rsquo;ve automated the repetitive tasks that are required while building and deploying Rails apps.&lt;/p&gt;

&lt;h3&gt;Rails console&lt;/h3&gt;

&lt;p&gt;In Rails 2 apps, you get a console by running &lt;code&gt;./script/console&lt;/code&gt;, but in Rails 3, you get a console by running &lt;code&gt;./script/rails console&lt;/code&gt;. Because I want to open a console without having to remember which version of Rails I&amp;rsquo;m using, I wrote an alias to figure it out and do the right thing for me.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Rails 2 and Rails 3 console
# usage: rc [ENVIRONMENT]
function rc {
  if [ -e &amp;ldquo;./script/console&amp;rdquo; ]; then
    ./script/console $@
  else
    rails console $@
  fi
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;SSH Host Keys&lt;/h3&gt;

&lt;p&gt;Deploying apps to EC2 or something similar means that you will inevitably run into SSH telling you that the host key has changed and you could be experiencing a man-in-the-middle attack. Making the error go away requires opening your &lt;code&gt;known_hosts&lt;/code&gt; file, finding the right line, deleting it, saving the file, and then trying again. It&amp;rsquo;s a giant pain in the ass.&lt;/p&gt;

&lt;p&gt;The most common &amp;ldquo;fix&amp;rdquo; that I have seen is to disable host key checking entirely, but that removes the security provided by host keys. My fix is to be able to remove stale host keys quickly and then get back to what I was doing.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Remove known host entries
# usage: ssh-rm-host -n LINENUM
#        ssh-rm-host HOSTNAME
function ssh-rm-host () {
  if [ &amp;ldquo;$1&amp;rdquo; == &amp;ldquo;-n&amp;rdquo; ]; then
    sed -i old $2d ~/.ssh/known_hosts
  else
    ssh-keygen -R $1
  fi
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Running specs&lt;/h3&gt;

&lt;p&gt;Similar to the console, running specs in Rails 3 apps requires RSpec 2 and the &lt;code&gt;rspec&lt;/code&gt; binary. Specs in Rails 2 require RSpec 1 and the &lt;code&gt;spec&lt;/code&gt; binary. Fortunately, the &lt;code&gt;spec_helper.rb&lt;/code&gt; helps us distinguish between versions of RSpec, so we can just run the tests without stressing about versions.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# easy spec running
# usage: s [RSPEC_OPTS]
function s {
  if grep -q -i &amp;ldquo;RSpec.configure do&amp;rdquo; spec/spec_helper.rb; then
    # echo &amp;ldquo;rspec2!&amp;rdquo;
    if [ -z &amp;ldquo;$*&amp;rdquo; ]; then
      rspec -fs -c spec
    else
      rspec -fs -c $*
    fi
  else
    # echo &amp;ldquo;rspec1!&amp;rdquo;
    if [ -z &amp;ldquo;$*&amp;rdquo; ]; then
      spec _1.3.2_ -fs -c spec
    else
      spec _1.3.2_ -fs -c $*
    fi
  fi
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Rails logs&lt;/h3&gt;

&lt;p&gt;Tailing logs isn&amp;rsquo;t actually that hard, but I type it so frequently that I got tired of doing it. While I&amp;rsquo;m at it, I&amp;rsquo;ll throw in my less-related configuration that comes in handy.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export PAGER=&amp;lsquo;less&amp;rsquo; # less is more (than more)
export LESSEDIT=&amp;lsquo;mate -l %lm %f&amp;rsquo; # open in textmate from less
export LESS=&amp;lsquo;-XFRf&amp;rsquo; # don&amp;rsquo;t clear screen on exit, show colors
alias rl=&amp;lsquo;less log/development.log&amp;rsquo;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Other handy stuff&lt;/h3&gt;

&lt;p&gt;It&amp;rsquo;s not directly related to Rails development, but I highly endorse &lt;a href=&quot;https://github.com/joelthelion/autojump/&quot;&gt;autojump&lt;/a&gt; for getting around quickly and my &lt;a href=&quot;https://github.com/indirect/tm&quot;&gt;tm&lt;/a&gt; tool for opening TextMate projects from the command line.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s all I&amp;rsquo;ve got at the moment, but if you have any suggestions or additions I&amp;rsquo;d be interested to hear about them.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sending Delayed Job Exceptions to Hoptoad</title>
   <link href="http://andre.arko.net/2011/07/02/sending-delayed-job-exceptions-to-hoptoad/"/>
   <updated>2011-07-02T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/07/02/sending-delayed-job-exceptions-to-hoptoad</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;ve been using &lt;a href=&quot;https://github.com/collectiveidea/delayed_job&quot;&gt;delayed_job&lt;/a&gt; to handle background tasks recently. Unfortunately, my background jobs have sometimes had bugs (either in my code or in the code of the web service I usually talk to). While DJ records the last exception in the database between retries, the job itself is deleted completely on failure. Since I don&amp;rsquo;t want my jobs table to fill up with every job I&amp;rsquo;ve ever had that failed, I decided to send exceptions that occur during DJ jobs to Hoptoad. The error is saved for posterity at Hoptoad, I get an email notifying me there was a problem, and anyone on the team can investigate the issue. Wins all around. How do you do this black magic, you ask? It&amp;rsquo;s actually not too bad in the end. Create an initializer in your Rails app (I creatively name mine &lt;code&gt;delayed_job_hoptoad.rb&lt;/code&gt;), and then add this code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Monkeypatch Delayed::Job to send Hoptoad notifications when there are exceptions
require &amp;lsquo;hoptoad_notifier&amp;rsquo;

module Delayed
  class Worker

    def handle_failed_job_with_hoptoad(job, error)
      HoptoadNotifier.notify_or_ignore(error, :cgi_data =&amp;gt; job.attributes)
      handle_failed_job_without_hoptoad(job, error)
    end
    alias_method_chain :handle_failed_job, :hoptoad

  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Not too bad in the end. I originally called &lt;code&gt;handle_failed_job&lt;/code&gt; instead of &lt;code&gt;handle_failed_job_without_hoptoad&lt;/code&gt;, though, and that resulted in a stack overflow every time there was an error. Way to make things better, I know.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rails page caching, Nginx, and RESTful routes</title>
   <link href="http://andre.arko.net/2011/06/30/rails-page-caching-nginx-and-restful-apis/"/>
   <updated>2011-06-30T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/06/30/rails-page-caching-nginx-and-restful-apis</id>
   <content type="html">&lt;h3&gt;Or, Why Am I Getting These 405 Not Allowed Errors&lt;/h3&gt;

&lt;p&gt;There are some situations where Rails' page caching is really great. Usually big pages that take a while to generate and are publicly available to everyone. If you&amp;rsquo;re using Rails page caching, chances are good that you&amp;rsquo;re also using Nginx, because everyone seems to be doing that nowadays. Suddenly, a &lt;s&gt;challenger&lt;/s&gt; problem appears! If you are also using &lt;a href=&quot;http://guides.rubyonrails.org/routing.html&quot;&gt;RESTful routes&lt;/a&gt; as per the Rails defaults, Nginx suddenly starts throwing inexplicable &lt;code&gt;405 Not Allowed&lt;/code&gt; errors.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s assume you have cached a page for a certain URL, like &lt;code&gt;/posts&lt;/code&gt;. Once the cached file is generated, Nginx will serve that file instead of passing the request to the Rails backend. Creating a new post involves a POST request to the very same url &lt;code&gt;/posts&lt;/code&gt;. Unfortunately, Nginx notices the cached file and helpfully informs you that it&amp;rsquo;s not possible to issue a POST request against a static file (that 405 that is probably driving you crazy). Fortunately, there is a solution!&lt;/p&gt;

&lt;p&gt;The solution has two steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Set your page_cache directory to &lt;code&gt;public/cache&lt;/code&gt; by editing &lt;code&gt;production.rb&lt;/code&gt; to have a line like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;config.action_controller.page_cache_directory = Rails.root.join(&amp;ldquo;public/cache&amp;rdquo;).to_s
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit your nginx config file, adding these two conditionals to your server block:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;server {
    # &amp;hellip; your other nginx and rails configuration stuff &amp;hellip;

    # Don&amp;rsquo;t try to serve the cache for POST, PUT, or DELETE
    # if you do try, nginx returns a 405 Not Allowed error
    if ($request_method != GET) {
        break;
    }

    # If it is a GET after all, try to serve the cache before
    # passing the request off to passenger
    if (-f $document_root/cache$uri) {
        rewrite (.*) /cache$1 break;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It&amp;rsquo;s not that simple, and required lots of trial and error to get working, but you can just copy and paste my solution and be done. Go internet.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Deploying With Bundler Slides</title>
   <link href="http://andre.arko.net/2011/06/11/deploying-with-bundler-slides/"/>
   <updated>2011-06-11T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/06/11/deploying-with-bundler-slides</id>
   <content type="html">&lt;p&gt;&lt;em&gt;I gave a talk at RailsConf 2011 about deploying with Bundler. These are slides for the talk. I&amp;rsquo;ve also posted my &lt;a href=&quot;/2011/06/11/deploying-with-bundler-notes&quot;&gt;notes for the talk&lt;/a&gt;. Combined, they probably serve as a somewhat reasonable replacement for having seen the talk itself.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.001.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.001.jpg &quot; alt=&quot;deploying.001&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.002.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.002.jpg &quot; alt=&quot;deploying.002&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.003.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.003.jpg &quot; alt=&quot;deploying.003&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.004.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.004.jpg &quot; alt=&quot;deploying.004&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.005.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.005.jpg &quot; alt=&quot;deploying.005&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.006.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.006.jpg &quot; alt=&quot;deploying.006&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.007.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.007.jpg &quot; alt=&quot;deploying.007&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.008.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.008.jpg &quot; alt=&quot;deploying.008&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.009.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.009.jpg &quot; alt=&quot;deploying.009&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.010.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.010.jpg &quot; alt=&quot;deploying.010&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.011.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.011.jpg &quot; alt=&quot;deploying.011&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.012.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.012.jpg &quot; alt=&quot;deploying.012&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.013.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.013.jpg &quot; alt=&quot;deploying.013&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.014.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.014.jpg &quot; alt=&quot;deploying.014&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.015.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.015.jpg &quot; alt=&quot;deploying.015&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.016.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.016.jpg &quot; alt=&quot;deploying.016&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.017.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.017.jpg &quot; alt=&quot;deploying.017&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.018.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.018.jpg &quot; alt=&quot;deploying.018&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.019.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.019.jpg &quot; alt=&quot;deploying.019&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.020.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.020.jpg &quot; alt=&quot;deploying.020&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.021.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.021.jpg &quot; alt=&quot;deploying.021&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.022.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.022.jpg &quot; alt=&quot;deploying.022&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.023.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.023.jpg &quot; alt=&quot;deploying.023&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.024.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.024.jpg &quot; alt=&quot;deploying.024&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.025.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.025.jpg &quot; alt=&quot;deploying.025&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.026.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.026.jpg &quot; alt=&quot;deploying.026&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.027.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.027.jpg &quot; alt=&quot;deploying.027&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.028.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.028.jpg &quot; alt=&quot;deploying.028&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.029.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.029.jpg &quot; alt=&quot;deploying.029&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.030.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.030.jpg &quot; alt=&quot;deploying.030&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.031.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.031.jpg &quot; alt=&quot;deploying.031&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.032.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.032.jpg &quot; alt=&quot;deploying.032&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.033.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.033.jpg &quot; alt=&quot;deploying.033&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.034.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.034.jpg &quot; alt=&quot;deploying.034&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.035.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.035.jpg &quot; alt=&quot;deploying.035&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.036.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.036.jpg &quot; alt=&quot;deploying.036&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.037.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.037.jpg &quot; alt=&quot;deploying.037&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.038.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.038.jpg &quot; alt=&quot;deploying.038&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.039.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.039.jpg &quot; alt=&quot;deploying.039&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.040.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.040.jpg &quot; alt=&quot;deploying.040&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.041.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.041.jpg &quot; alt=&quot;deploying.041&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.042.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.042.jpg &quot; alt=&quot;deploying.042&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.043.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.043.jpg &quot; alt=&quot;deploying.043&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.044.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.044.jpg &quot; alt=&quot;deploying.044&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.045.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.045.jpg &quot; alt=&quot;deploying.045&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.046.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.046.jpg &quot; alt=&quot;deploying.046&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.047.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.047.jpg &quot; alt=&quot;deploying.047&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.048.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.048.jpg &quot; alt=&quot;deploying.048&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.049.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.049.jpg &quot; alt=&quot;deploying.049&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.050.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.050.jpg &quot; alt=&quot;deploying.050&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.051.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.051.jpg &quot; alt=&quot;deploying.051&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.052.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.052.jpg &quot; alt=&quot;deploying.052&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.053.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.053.jpg &quot; alt=&quot;deploying.053&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.054.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.054.jpg &quot; alt=&quot;deploying.054&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.055.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.055.jpg &quot; alt=&quot;deploying.055&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.056.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.056.jpg &quot; alt=&quot;deploying.056&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.057.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.057.jpg &quot; alt=&quot;deploying.057&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.058.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.058.jpg &quot; alt=&quot;deploying.058&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.059.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.059.jpg &quot; alt=&quot;deploying.059&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.060.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.060.jpg &quot; alt=&quot;deploying.060&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.061.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.061.jpg &quot; alt=&quot;deploying.061&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.062.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.062.jpg &quot; alt=&quot;deploying.062&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.063.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.063.jpg &quot; alt=&quot;deploying.063&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.064.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.064.jpg &quot; alt=&quot;deploying.064&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.065.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.065.jpg &quot; alt=&quot;deploying.065&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.066.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.066.jpg &quot; alt=&quot;deploying.066&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.067.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.067.jpg &quot; alt=&quot;deploying.067&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.068.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.068.jpg &quot; alt=&quot;deploying.068&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.069.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.069.jpg &quot; alt=&quot;deploying.069&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.070.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.070.jpg &quot; alt=&quot;deploying.070&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.071.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.071.jpg &quot; alt=&quot;deploying.071&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.072.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.072.jpg &quot; alt=&quot;deploying.072&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.073.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.073.jpg &quot; alt=&quot;deploying.073&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.074.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.074.jpg &quot; alt=&quot;deploying.074&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.075.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.075.jpg &quot; alt=&quot;deploying.075&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.076.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.076.jpg &quot; alt=&quot;deploying.076&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.077.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.077.jpg &quot; alt=&quot;deploying.077&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.078.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.078.jpg &quot; alt=&quot;deploying.078&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.079.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.079.jpg &quot; alt=&quot;deploying.079&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.080.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.080.jpg &quot; alt=&quot;deploying.080&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.081.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.081.jpg &quot; alt=&quot;deploying.081&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.082.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.082.jpg &quot; alt=&quot;deploying.082&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.083.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.083.jpg &quot; alt=&quot;deploying.083&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.084.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.084.jpg &quot; alt=&quot;deploying.084&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.085.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.085.jpg &quot; alt=&quot;deploying.085&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.086.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.086.jpg &quot; alt=&quot;deploying.086&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.087.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.087.jpg &quot; alt=&quot;deploying.087&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.088.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.088.jpg &quot; alt=&quot;deploying.088&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.089.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.089.jpg &quot; alt=&quot;deploying.089&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.090.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.090.jpg &quot; alt=&quot;deploying.090&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.091.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.091.jpg &quot; alt=&quot;deploying.091&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.092.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.092.jpg &quot; alt=&quot;deploying.092&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.093.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2011/06/11/deploying-with-bundler-slides/deploying.thumb.093.jpg &quot; alt=&quot;deploying.093&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Deploying With Bundler Notes</title>
   <link href="http://andre.arko.net/2011/06/11/deploying-with-bundler-notes/"/>
   <updated>2011-06-11T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/06/11/deploying-with-bundler-notes</id>
   <content type="html">&lt;p&gt;&lt;em&gt;I gave a talk at RailsConf 2011 about deploying with Bundler. These are my notes for the talk. I&amp;rsquo;ve also posted my &lt;a href=&quot;/2011/06/11/deploying-with-bundler-slides&quot;&gt;slides for the talk&lt;/a&gt;. Combined, they probably serve as a somewhat reasonable replacement for having seen the talk itself.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Bundler exists to make booting your application consistent and repeatable, guaranteed. It does this by having you write a Gemfile listing of all the gems that your application needs to boot. When it installs those gems, it records the exact version of every gem into the Gemfile.lock file. Other developers are guaranteed to have the same gems you do. Your production servers are guaranteed to have the same gems you do.&lt;/p&gt;

&lt;p&gt;This is a big deal.&lt;/p&gt;

&lt;p&gt;It seems kind of easy and obvious now in retrospect, but in the bad old days, it could take anywhere from hours to days to get a new developer or a new server up and running your app with all the right versions of the gems that you needed. That entire process has been boiled down to running &lt;code&gt;bundle install&lt;/code&gt; and waiting for a minute or two.&lt;/p&gt;

&lt;p&gt;So! You start developing a beautiful new application. At some point, someone else starts working on it with you, and they only have to run &lt;code&gt;bundle install&lt;/code&gt; and then they can start developing, too. Later, you realize that you want to deploy this application to a server in production so that the entire world can see it. Fantastic.&lt;/p&gt;

&lt;p&gt;Now that Ruby application servers all use Rack to communicate with your underlying application, Rails, Sinatra, and every other web framework can be treated identically for deployment. Just put the library you use into your Gemfile, and your app will have all the gems that it needs to run on the server.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;m going to cover the various deployment options that are available to apps that use Bundler, starting with the simplest and easiest, and expanding to include the more unusual and more complicated scenarios at the end.&lt;/p&gt;

&lt;p&gt;The most drop-dead simple thing that you can possibly do to get your bundled application up and running on a server on the public internet is to have someone else do it. If you use Heroku, you can &lt;code&gt;git push heroku master&lt;/code&gt;, and if you use Engine Yard, you can run &lt;code&gt;ey deploy&lt;/code&gt;. In either case, their infrastructure will take care of everything. They check and see that you have a Gemfile, they run Bundler with settings tuned for their specific environments, and then they boot your application and you can start using it right away.&lt;/p&gt;

&lt;p&gt;The next level of complexity is running your own server, installing Phusion Passenger, and having Passenger manage each of your app server instances. It&amp;rsquo;s not that much more complicated, but this is the point at which you run into the first potential Bundler deployment issue: installing system gems requires root permissions.&lt;/p&gt;

&lt;p&gt;You might be tempted to add &lt;code&gt;sudo bundle install&lt;/code&gt; to your deployment script and call it a day, but that turns out to be a terrible idea. The crux of the problem is that &lt;code&gt;bundle install&lt;/code&gt; saves configuration information that is specific to this application &amp;mdash; what groups of gems to ignore (like :development or :test), where the gems are installed to, all of those sorts of things. If you run &lt;code&gt;bundle install&lt;/code&gt; as root, that file is created and owned by root. That means the Passenger app server (which runs as the nobody user by default) can&amp;rsquo;t read or write to the bundle configuration.&lt;/p&gt;

&lt;p&gt;Bundler contains an &amp;ldquo;emergency workaround&amp;rdquo; for this situation where Bundler will invoke sudo itself to install the gems. It&amp;rsquo;s a hacky workaround at best, though, because entering your sudo password isn&amp;rsquo;t scriptable. Even more awkwardly, many system administrators don&amp;rsquo;t give regular users the ability to sudo at all. This means installing to system gems is ruled out completely. The much more effective solution is to install the application&amp;rsquo;s gems into a path owned by the web server user. This is simple to do with the command &lt;code&gt;bundle install &amp;mdash;path vendor/bundle&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Okay, so now we have our gems installed on the server into an application-specific path. There is one potential issue remaining: what happens if a developer changes the Gemfile, forgets to run &lt;code&gt;bundle install&lt;/code&gt;, and then tries to deploy? The deploy script will install the bundle on the production server, but the server will be running against gems that have never been tested at all. You can avoid the potential disaster by using &lt;code&gt;bundle install &amp;mdash;frozen&lt;/code&gt;. Frozen mode means that Bundler checks the Gemfile against the Gemfile.lock file, and refuses to install if they don&amp;rsquo;t match. The error message instructs you to run &lt;code&gt;bundle install&lt;/code&gt; on your development machine, make sure everything works, and then check in a new Gemfile.lock with the versions that you are now sure work with your application.&lt;/p&gt;

&lt;p&gt;Now your application works in production, you can deploy without superuser permissions, and you will never run with gems in production that haven&amp;rsquo;t been tested yet! Since this is the most common case, Bundler wraps all of this up into a single option that you can pass to the install command: &lt;code&gt;bundle install &amp;mdash;deployment&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But wait, you say, what if I use Unicorn or Rainbows or Mongrel or something like that? Well, it&amp;rsquo;s pretty simple as well. Just add the server to your Gemfile. When you want to run your server, use e.g. &lt;code&gt;bundle exec unicorn&lt;/code&gt;. This will make sure that the exact version in your Gemfile will be started, regardless of other versions on your system.&lt;/p&gt;

&lt;p&gt;The final complication that we sometimes see while deploying to production environments is servers that have been heavily firewalled, and cannot connect to rubygems.org to download gems for installation at deploy-time. Sometimes it&amp;rsquo;s possible to use a proxy server, but when even that isn&amp;rsquo;t an option, Bundler has your back. Run the command &lt;code&gt;bundle pack&lt;/code&gt; to download the .gem file for every gem that your application needs into the &lt;code&gt;vendor/cache&lt;/code&gt; directory. When you run &lt;code&gt;bundle install&lt;/code&gt; later, Bundler is smart enough to automatically look in &lt;code&gt;vendor/cache&lt;/code&gt;. It will install your bundle using those gems as a source, and completely avoid contacting rubygems.org, allowing you to deploy into the most restrictive server setup.&lt;/p&gt;

&lt;p&gt;At this point, you&amp;rsquo;re probably thinking that this sounds like a lot to remember, and a lot of effort to get set up. Fortunately, Bundler even goes beyond providing the &amp;mdash;deployment flag. It integrates directly with Capistrano and Vlad, the two most popular deployment systems. Adding Bundler to a working deploy setup is incredibly easy. With Capistrano, just add &lt;code&gt;require &amp;lsquo;bundler/capistrano&amp;rsquo;&lt;/code&gt; to your deploy.rb, and everything will work. With Vlad, just &lt;code&gt;require &amp;lsquo;bundler/vlad&amp;rsquo;&lt;/code&gt; in your deploy.rb, and make sure that your deploy task also runs the task &lt;code&gt;vlad:bundle:install&lt;/code&gt;. That&amp;rsquo;s it !If you need to adjust Bundler options, like the location the gems are installed to, or the list of groups that shouldn&amp;rsquo;t be installed, you can. Just set some variables in your deploy script before Bundler runs. The details of how to configure everything are available at gembundler.com/deploying.&lt;/p&gt;

&lt;p&gt;The next feature release of Bundler, version 1.1, will include several features that make deploying easier in specific scenarios. The biggest change, which everyone will be able to use, is that Bundler no longer downloads the entire Rubygems source index before installing. Nick Quaranto has added a new API to rubygems.org that allows Bundler to download only the gem specs that it needs to install your Gemfile. This is a great improvement. In my tests, it cut down the time to install a small Gemfile from 30 seconds down to under 10 seconds. Another new feature that can help with deployments is &amp;mdash;standalone mode. When you install your bundle with standalone mode enabled, Bundler is no longer needed at the system level. Your application becomes self-contained, and is able to load its installed gems itself. If you want to try out these features now, and help us finish testing them, you can get a prerelease of Bundler 1.1 today by running &lt;code&gt;gem install Bundler &amp;mdash;pre&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So that&amp;rsquo;s how to deploy your application and all its dependencies reliably and repeatably using Bundler.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>undefined method `merge' for nil:NilClass</title>
   <link href="http://andre.arko.net/2011/05/27/undefined-method-merge-for-nilnilclass/"/>
   <updated>2011-05-27T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/05/27/undefined-method-merge-for-nilnilclass</id>
   <content type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;

&lt;p&gt;If you are using Nginx and Passenger to serve a Rails app, your filesystem is full. Delete some stuff.&lt;/p&gt;

&lt;h3&gt;The story&lt;/h3&gt;

&lt;p&gt;In what is definitely the craziest error that I have run into recently, my staging site suddenly started returning 500 errors to some requests. It even took me a while to figure that the app was erroring because I wasn&amp;rsquo;t getting any exceptions reported by Hoptoad.&lt;/p&gt;

&lt;p&gt;When I finally looked in the Rails log myself, this is all that was there:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Started POST &amp;ldquo;/users/sign_in&amp;rdquo; for 70.36.143.76 at Fri May 27 17:03:22 -0500 2011

NoMethodError (undefined method merge' for nil:NilClass):
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's… not exactly helpful. I kept digging, and eventually figured out that the error only occurred on POST requests. Worse, everything was fine if I booted up a server using &lt;code&gt;rails server -e staging&lt;/code&gt;. For that process, POST requests worked and everything was fine.&lt;/p&gt;

&lt;p&gt;Hoping it was something transient, I restarted Nginx, only to discover this (even scarier) error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[alert]: Unable to start the Phusion Passenger watchdog: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error 18446744073709551615)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;While that may be the longest error number that I have ever seen, it still didn&amp;rsquo;t give me any idea what was going on.&lt;/p&gt;

&lt;p&gt;Finally, while trying to boot passenger by itself using &lt;code&gt;passenger start&lt;/code&gt;, I saw this error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/local/lib/ruby/1.8/fileutils.rb:243:in mkdir': Too many links &amp;ndash; /tmp/root-passenger-standalone-30121 (Errno::EMLINK)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Too many links! That&amp;rsquo;s when it finally occurred to me that the filesystem might be out of handles, and suddenly that made sense out of my vague recollection that Nginx writes POST bodies to files to pass them to the app server.&lt;/p&gt;

&lt;p&gt;Sure enough, /tmp was full of stuff:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls /tmp | wc -l
31998
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Most of those weren&amp;rsquo;t used at all, so I started deleting them. With that, everything started working again. Magic. :P&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Add true Readline to Ruby on OS X</title>
   <link href="http://andre.arko.net/2011/05/26/add-true-readline-to-ruby-on-os-x-1067/"/>
   <updated>2011-05-26T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2011/05/26/add-true-readline-to-ruby-on-os-x-1067</id>
   <content type="html">&lt;p&gt;I normally use OS X system Ruby. As of OS X 10.6.4, that is Ruby 1.8.7-p174. Sadly, system Ruby links against libedit instead of libreadline, which means I can&amp;rsquo;t use any of my nice readline setup.&lt;/p&gt;

&lt;p&gt;To fix that, you can install readline &lt;a href=&quot;http://henrik.nyh.se/2008/03/irb-readline&quot;&gt;with MacPorts&lt;/a&gt; or &lt;a href=&quot;http://www.jorgebernal.info/development/fixing-snow-leopard-ruby-readline&quot;&gt;by hand&lt;/a&gt; and then compile a new &lt;code&gt;readline.bundle&lt;/code&gt; for Ruby to use. But I use &lt;a href=&quot;https://github.com/mxcl/homebrew&quot;&gt;Homebrew&lt;/a&gt; to manage my unix packages, so those instructions weren&amp;rsquo;t quite enough for me.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s how to add true Readline compatibility to Ruby 1.8.7-p174 on OS X 10.6 using Homebrew.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Install readline
brew install readline

# Download the readline extension
cd /tmp
svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_174/ext/readline/

# Compile the bundle against homebrewed readline
make readline.o CFLAGS=&amp;lsquo;-I/usr/local/Cellar/readline/6.1/include -DHAVE_RL_USERNAME_COMPLETION_FUNCTION&amp;rsquo;
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o readline.bundle readline.o -L/usr/local/Cellar/readline/6.1/lib -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lreadline -lncurses -lpthread -ldl

# Move the bundle into the right place
cd /Library/Ruby/Site/1.8/universal-darwin10.0/
sudo mv readline.bundle readline.bundle.libedit
sudo mv /tmp/readline/readline.bundle ./readline.bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Tada! Working Readline support in Ruby, including IRB.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Extending Rails 3 with Railties</title>
   <link href="http://andre.arko.net/2010/10/15/extending-rails-3-with-railties/"/>
   <updated>2010-10-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/10/15/extending-rails-3-with-railties</id>
   <content type="html">&lt;p&gt;Rails 3.0 is finally released, and with it comes a fantastic new way to extend Rails: Railties. Railties are the basis of the core components of Rails 3, and are the result of months of careful refactoring by Carlhuda. It is easier to extend and expand Rails than it has ever been before, without an &lt;code&gt;alias_method_chain&lt;/code&gt; in sight.&lt;/p&gt;

&lt;p&gt;Unfortunately, while the system for extending and expanding Rails has been completely overhauled, the documentation hasn&amp;rsquo;t been updated yet. The &lt;a href=&quot;http://guides.rubyonrails.org/plugins.html&quot;&gt;Rails Plugins Guide&lt;/a&gt; only covers writing plugins in the old Rails 2 style. Ilya Grigorik wrote a &lt;a href=&quot;http://www.igvita.com/2010/08/04/rails-3-internals-railtie-creating-plugins/&quot;&gt;Railtie &amp;amp; Creating Plugins&lt;/a&gt; blog post, but just scratched the surface of what is possible with a Railtie plugin. This post covers writing Railtie plugins, hooking into the Rails initialization process, packaging Railtie plugins as gems, and using gem plugins in a Rails 3 application.&lt;/p&gt;

&lt;h2&gt;Creating Railtie plugins&lt;/h2&gt;

&lt;p&gt;Creating a Railtie is easy. Just create a class that inherits from &lt;a href=&quot;http://api.rubyonrails.org/classes/Rails/Railtie.html&quot;&gt;&lt;code&gt;::Rails::Railtie&lt;/code&gt;&lt;/a&gt;. Every subclass of Railtie is used to initialize your Rails application. Since ActionController, ActionView, and the other Rails components are also Railties, your plugin can function as a first-class member of the Rails application. It will have access to the same methods and context that are used by the official Rails components. Here is a sample minimal Railtie that will be loaded when your Rails application boots.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://api.rubyonrails.org/classes/Rails/Railtie.html&quot;&gt;Railtie documentation&lt;/a&gt; lists all of the methods that are available inside each Railtie class, but doesn&amp;rsquo;t really go into depth about what you can use Railties to do. Here are some example Railties explaining how to use the Railtie methods (in alphabetical order) to customize and extend Rails.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;console&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;console&lt;/code&gt; method allows your Railtie to add code that will be run when a Rails console is started.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;generators&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;Rails will require any generators defined in &lt;code&gt;lib/generators/*.rb&lt;/code&gt; automatically. If you ship &lt;a href=&quot;http://api.rubyonrails.org/classes/Rails/Generators.html&quot;&gt;Rails::Generators&lt;/a&gt; with your Railtie in some other directory, you can require them using this method.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;rake_tasks&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;If you ship rake tasks for apps with your Railtie, load them using this method.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;initializer&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;initializer&lt;/code&gt; method provides Railties with a lot of power. They create initializers that will be run during the Rails boot process, like the files put into &lt;code&gt;config/initializers&lt;/code&gt; in the app directory. The &lt;code&gt;initializer&lt;/code&gt; method takes two options, &lt;code&gt;:after&lt;/code&gt; or &lt;code&gt;:before&lt;/code&gt;, if there are specific initializers that you want to run before or after yours.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h2&gt;Rails configuration hooks&lt;/h2&gt;

&lt;p&gt;The biggest extension hook that Railties provide is somewhat unassuming: the &lt;code&gt;config&lt;/code&gt; method. That method returns the instance of &lt;a href=&quot;http://api.rubyonrails.org/classes/Rails/Railtie/Configuration.html&quot;&gt;&lt;code&gt;Railtie::Configuration&lt;/code&gt;&lt;/a&gt; that belongs to the application being booted. This opens up all sorts of interesting possibilities, since the &lt;code&gt;config&lt;/code&gt; object is the same one that is made available inside a Rails application&amp;rsquo;s &lt;code&gt;environment.rb&lt;/code&gt; file. Here are some annotated examples of using &lt;code&gt;config&lt;/code&gt; to change how a Rails application is initialized and configured.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;after_initialize&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;This method takes a block that will be run after Rails is is completely initialized, and all of the application&amp;rsquo;s initializers have run.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;app_middleware&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;This method exposes the &lt;a href=&quot;http://api.rubyonrails.org/classes/ActionDispatch/MiddlewareStack.html&quot;&gt;MiddlewareStack&lt;/a&gt; that will be used to handle requests to your Rails application. You can use any of the methods defined on MiddlewareStack, including &lt;code&gt;use&lt;/code&gt; and &lt;code&gt;swap&lt;/code&gt;, to manage the Rails application&amp;rsquo;s Rack middlewares. For example, if your Railtie included the Rack middleware &lt;code&gt;MyRailtie::Middleware&lt;/code&gt;, you could add it to the Rails application middleware stack like this.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;before_configuration&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;Code passed in a block to this method will be run after immediately before the application configuration block inside &lt;code&gt;application.rb&lt;/code&gt; is run. This is usually the best place to set default options that users of your plugin should be able to override themselves, as in the &lt;code&gt;jquery-rails&lt;/code&gt; example below.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;before_eager_load&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;The block passed to &lt;code&gt;before_eager_load&lt;/code&gt; will be run before Rails requires the application’s classes. Eager load is never run in development mode. However, if you need to run code after Rails loads but before any application code loads, this is the place to put it.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;before_initialize&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;This method takes a block to be run before the Rails initialization process happens &amp;mdash; this is basically equivalent to creating an initializer, and setting it to run :before the first initializer the app has.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;generators&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;This object holds the configuration for the generators that are invoked when you run the &lt;code&gt;rails generate&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;You can also use it to disable colorized logging in the console.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;to_prepare&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;Last, but quite importantly, &lt;code&gt;to_prepare&lt;/code&gt; allows you the chance to do one-time setup. The block you pass to this method will be run for every request in development mode, but only once in production. Use it when you need to set something up once before the app starts serving requests.&lt;/p&gt;

&lt;h2&gt;Examples&lt;/h2&gt;

&lt;p&gt;At this point, you&amp;rsquo;re probably thinking &amp;ldquo;why would I actually want to do any of that stuff?&amp;rdquo;. So, here are a few select examples of Railtie plugins packaged as gems.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://github.com/rspec/rspec-rails&quot;&gt;rspec-rails&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;The rspec-rails plugin ships with a set of rake tasks and generators that integrate the &lt;a href=&quot;http://github.com/rspec/rspec&quot;&gt;RSpec&lt;/a&gt; gem with Rails.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;This Railtie just does three things: First, it sets the generators that will be used for integration tests via the &lt;code&gt;integration_tool&lt;/code&gt; method. Next, it sets the generators that will be used to generate model, controller, and view tests (via the &lt;code&gt;test_framework&lt;/code&gt; method). Last, it loads the RSpec rake tasks to run RSpec tests instead of test-unit tests.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://github.com/indirect/jquery-rails&quot;&gt;jquery-rails&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;The jquery-rails plugin ships with a generator that downloads and installs jQuery, the jquery-ujs script that enables Rails helpers with jQuery, and optionally installs jQueryUI as well.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;This Railtie only sets one setting, but checks for the jQueryUI library to determine the value to set. By using the &lt;code&gt;config.before_configuration&lt;/code&gt; hook, it runs right before the &lt;code&gt;application.rb&lt;/code&gt; config block runs. That means it has access to the Rails.root, which is needed to check for jQueryUI, and it means that users can still override &lt;code&gt;javascript_expansion[:defaults]&lt;/code&gt; in their &lt;code&gt;application.rb&lt;/code&gt; if they want something different than the new defaults that the plugin provides.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://github.com/indirect/haml-rails&quot;&gt;haml-rails&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;The haml-rails gem provides generators for views written in Haml instead of the default generated views that are written in ERB.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;This Railtie simply changes the template engine that Rails invokes when you run &lt;code&gt;rails generate&lt;/code&gt;, and then initializes Haml for Rails, and sets the Haml output format to HTML5.&lt;/p&gt;

&lt;h2&gt;Packaging up gem plugins&lt;/h2&gt;

&lt;p&gt;Railtie plugins are easy to turn into gem plugins for Rails. This makes them easy to distribute, manage, and upgrade. The first thing you need is a gem. If you don&amp;rsquo;t have a gem yet, you can create a new gem easily using &lt;a href=&quot;http://gembundler.com&quot;&gt;Bundler&lt;/a&gt;. Just run &lt;code&gt;bundle gem my_new_gem&lt;/code&gt; and Bundler will generate a skeleton gem and gemspec that follow gem best practices. Once you have a gem, just make sure that your Railtie subclass is defined when &lt;code&gt;lib/my_new_gem.rb&lt;/code&gt; is loaded. You can define the Railtie in a separate file and require that file, or define it directly. Last, add a dependency on the Rails gem (~&amp;gt;3.0) to your gemspec.&lt;/p&gt;

&lt;p&gt;If your gem is also a plain Ruby library, and you don&amp;rsquo;t want to depend on the Rails gem, then you can put your Railtie in a separate file, and conditionally require that file inside your main library file.&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp&lt;/p&gt;

&lt;p&gt;This ensures that your gem can be loaded (without the Railtie) if it is loaded outside the context of a Rails application.&lt;/p&gt;

&lt;p&gt;Now that your gem has a Railtie, you can build it and release it to &lt;a href=&quot;http://gemcutter.org&quot;&gt;Gemcutter&lt;/a&gt;. Once your gem is on Gemcutter, using it with Rails 3 applications is extremely easy &amp;mdash; just add the gem to your &lt;code&gt;Gemfile&lt;/code&gt;. Bundler will download and install your gem when you run &lt;code&gt;bundle install&lt;/code&gt;, Rails will load it, and the &lt;code&gt;Rails::Railtie&lt;/code&gt; class takes care of the rest!&lt;/p&gt;

&lt;p class=&quot;aside&quot;&gt;This post was originally written for, and posted to, the &lt;a href=&quot;http://www.engineyard.com/blog/2010/extending-rails-3-with-railties/&quot;&gt;Engine Yard Blog&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jekyll postfiles plugin</title>
   <link href="http://andre.arko.net/2010/09/06/jekyll-postfiles-plugin/"/>
   <updated>2010-09-06T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/09/06/jekyll-postfiles-plugin</id>
   <content type="html">&lt;p&gt;Through the years, I&amp;rsquo;ve used a lot of blogging engines. Nowadays, I use &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; to generate a static version of my blog. Jekyll has had one annoying shortcoming for me, though &amp;mdash; it doesn&amp;rsquo;t support including files in a blog post. This has bitten me more than once, especially as I move between blogging engines (or just try to clean up random files on my web server).&lt;/p&gt;

&lt;p&gt;About a year ago, I decided to try to fix that. So, I forked Jekyll and patched it to allow files associated with posts in a &lt;code&gt;_postfiles&lt;/code&gt; directory. That worked for a while (although I had to install my fork onto my server, which was a little bit annoying). This week, I realized that my RSS feed had broken images because I was using relative paths to reference postfiles. To solve that, I decided to write a &lt;code&gt;{% postfile foo %}&lt;/code&gt; liquid tag that expanded file references out to absolute paths.&lt;/p&gt;

&lt;p&gt;While working on the liquid tag, I discovered that Jekyll 0.7 supports plugins, and that I could stop forking Jekyll and just write a plugin instead. So I did. Presenting &lt;a href=&quot;http://github.com/indirect/jekyll-postfiles&quot;&gt;jekyll-postfiles&lt;/a&gt;, a plugin for Jekyll that (optionally) adds files to each post. Just create a folder named &lt;code&gt;_postfiles&lt;/code&gt;, next to the folder named &lt;code&gt;_posts&lt;/code&gt;. When you have a file that you want to include in a post, create a folder with the same name as the post, and put the file in there, with a directory structure like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;_posts/
  2010-09-06-jekyll-postfiles-plugin.md
_postfiles/
  2010-09-06-jekyll-postfiles-plugin/
    file.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reference the file inside the post using the liquid tag, like &lt;code&gt;{% postfile file.zip %}&lt;/code&gt;, and you&amp;rsquo;re all set.&lt;/p&gt;

&lt;h3&gt;tl;dr&lt;/h3&gt;

&lt;p&gt;I wrote a Jekyll plugin to let you include files with your posts! You can get it on github at &lt;a href=&quot;http://github.com/indirect/jekyll-postfiles&quot;&gt;indirect/jekyll-postfiles&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Using PassengerPane with GEM_HOME set</title>
   <link href="http://andre.arko.net/2010/08/16/using-passengerpane-with-gem_home-set/"/>
   <updated>2010-08-16T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/08/16/using-passengerpane-with-gem_home-set</id>
   <content type="html">&lt;p&gt;I use the excellent &lt;a href=&quot;http://mxcl.github.com/homebrew&quot;&gt;homebrew&lt;/a&gt; to manage my unix software on OS X, and as a result my bash profile includes &lt;code&gt;export GEM_HOME /usr/local/Cellar/Gems/1.8&lt;/code&gt;. Unfortunately, that makes Passenger unable to find any of my gems, which is a bummer.&lt;/p&gt;

&lt;p&gt;However, it turns out the fix is just a one-line change to the .vhost files that PassengerPane creates in &lt;code&gt;/etc/apache2/passenger_pane_vhosts&lt;/code&gt;. Just add the line starting with &lt;code&gt;SetEnv&lt;/code&gt; below, and restart Apache.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;
  ServerName app.dev
  DocumentRoot &amp;ldquo;/Users/andre/Sites/app/public&amp;rdquo;
  RackEnv development
  SetEnv GEM_HOME /usr/local/Cellar/Gems/1.8
  &amp;lt;Directory &amp;ldquo;/Users/andre/Sites/app/public&amp;rdquo;&amp;gt;
    Order allow,deny
    Allow from all
  &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(I use .dev as my development TLD so that my applications don&amp;rsquo;t conflict with Bonjour domains on .local.)&lt;/p&gt;

&lt;p&gt;There. Now (hopefully) I will remember this post next time, and not print-debug Passenger&amp;rsquo;s environment &lt;em&gt;again&lt;/em&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Haml-rails gem for Haml with Rails 3</title>
   <link href="http://andre.arko.net/2010/08/15/haml-rails-gem-for-haml-with-rails-3/"/>
   <updated>2010-08-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/08/15/haml-rails-gem-for-haml-with-rails-3</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;m setting up a new Rails 3 app, and I discovered that the &lt;a href=&quot;http://github.com/rspec/rspec-rails&quot;&gt;rspec-rails&lt;/a&gt; plugin is a very well-behaved Rails 3 gem plugin. All you have to do is add it to your Gemfile, and then (via a Railtie) it adds RSpec rake tasks, adds some RSpec generators, and replaces Test/Unit as the testing framework for anything newly generated.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://haml-lang.com&quot;&gt;Haml&lt;/a&gt;, on the other hand, does not integrate with the new features that Rails 3 provides. You need to run &lt;code&gt;haml &amp;mdash;rails .&lt;/code&gt; to generate an initializer yourself, and it doesn&amp;rsquo;t come with any generators. The current haml generators had been living in my &lt;a href=&quot;http://github.com/indirect/rails3-generators&quot;&gt;rails3-generators&lt;/a&gt; gem, but that repo was just supposed to be a stopgap measure while plugin authors got around to integrating with Rails3 themselves.&lt;/p&gt;

&lt;p&gt;Since Haml doesn&amp;rsquo;t seem to have gotten around to integrating with Rails 3, I just did it myself: presenting &lt;a href=&quot;http://gemcutter.org/gems/haml-rails&quot;&gt;haml-rails&lt;/a&gt;, the gem that not only adds Haml generators, but hooks into Rails to activate Haml and replace ERB with Haml automatically. No configuration required.&lt;/p&gt;

&lt;p&gt;The source is &lt;a href=&quot;http://github.com/indirect/haml-rails&quot;&gt;on github&lt;/a&gt; if you want to check it out.&lt;/p&gt;

&lt;p&gt;Installation is pretty complicated, but I&amp;rsquo;m sure you can get the hang of it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Liquid error: No such file or directory &amp;ndash; posix_spawnp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bundler webinar slides</title>
   <link href="http://andre.arko.net/2010/08/04/bundler-webinar-slides/"/>
   <updated>2010-08-04T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/08/04/bundler-webinar-slides</id>
   <content type="html">&lt;p&gt;These are the slides for the &lt;a href=&quot;http://www.engineyard.com/video/13917022&quot;&gt;Bundler webinar&lt;/a&gt; I gave at &lt;a href=&quot;http://engineyard.com&quot;&gt;Engine Yard&lt;/a&gt;, right before the release of Bundler 1.0rc3.&lt;/p&gt;

&lt;p&gt;If you want to watch and listen to the entire thing,  Engine Yard has posted &lt;a href=&quot;http://www.engineyard.com/video/13917022&quot;&gt;a video of the presentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.001.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.001.thumb.jpg &quot; alt=&quot;webinar.001&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.002.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.002.thumb.jpg &quot; alt=&quot;webinar.002&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.003.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.003.thumb.jpg &quot; alt=&quot;webinar.003&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.004.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.004.thumb.jpg &quot; alt=&quot;webinar.004&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.005.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.005.thumb.jpg &quot; alt=&quot;webinar.005&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.006.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.006.thumb.jpg &quot; alt=&quot;webinar.006&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.007.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.007.thumb.jpg &quot; alt=&quot;webinar.007&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.008.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.008.thumb.jpg &quot; alt=&quot;webinar.008&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.009.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.009.thumb.jpg &quot; alt=&quot;webinar.009&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.010.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.010.thumb.jpg &quot; alt=&quot;webinar.010&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.011.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.011.thumb.jpg &quot; alt=&quot;webinar.011&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.012.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.012.thumb.jpg &quot; alt=&quot;webinar.012&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.013.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.013.thumb.jpg &quot; alt=&quot;webinar.013&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.014.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.014.thumb.jpg &quot; alt=&quot;webinar.014&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.015.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.015.thumb.jpg &quot; alt=&quot;webinar.015&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.016.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.016.thumb.jpg &quot; alt=&quot;webinar.016&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.017.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.017.thumb.jpg &quot; alt=&quot;webinar.017&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.018.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.018.thumb.jpg &quot; alt=&quot;webinar.018&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.019.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.019.thumb.jpg &quot; alt=&quot;webinar.019&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.020.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.020.thumb.jpg &quot; alt=&quot;webinar.020&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.021.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.021.thumb.jpg &quot; alt=&quot;webinar.021&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.022.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.022.thumb.jpg &quot; alt=&quot;webinar.022&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.023.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.023.thumb.jpg &quot; alt=&quot;webinar.023&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.024.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.024.thumb.jpg &quot; alt=&quot;webinar.024&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.025.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.025.thumb.jpg &quot; alt=&quot;webinar.025&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.026.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.026.thumb.jpg &quot; alt=&quot;webinar.026&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.027.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.027.thumb.jpg &quot; alt=&quot;webinar.027&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.028.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.028.thumb.jpg &quot; alt=&quot;webinar.028&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.029.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.029.thumb.jpg &quot; alt=&quot;webinar.029&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.030.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.030.thumb.jpg &quot; alt=&quot;webinar.030&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.031.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.031.thumb.jpg &quot; alt=&quot;webinar.031&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;/2010/08/04/bundler-webinar-slides/webinar.032.jpg &quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;/2010/08/04/bundler-webinar-slides/webinar.032.thumb.jpg &quot; alt=&quot;webinar.032&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Moving along</title>
   <link href="http://andre.arko.net/2010/07/10/moving-along/"/>
   <updated>2010-07-10T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/07/10/moving-along</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;m a little bit surprised to be saying this, but the week that just ended was my last week at &lt;a href=&quot;http://engineyard.com&quot;&gt;Engine Yard&lt;/a&gt;. I&amp;rsquo;ve had a great time working on &lt;a href=&quot;http://gembundler.com&quot;&gt;Bundler&lt;/a&gt; and EY&amp;rsquo;s &lt;a href=&quot;http://www.engineyard.com/products/appcloud&quot;&gt;Cloud&lt;/a&gt;, and I am sure EY will continue to do great things.&lt;/p&gt;

&lt;p&gt;Even though I&amp;rsquo;m leaving Engine Yard, I am staying on the Bundler team. I will be working closely with Carl and Yehuda in the coming weeks to resolve issues in the beta versions and finish the 1.0 release.&lt;/p&gt;

&lt;p&gt;That said, starting Monday, I&amp;rsquo;m going to be working at &lt;a href=&quot;http://plexapp.com&quot;&gt;Plex&lt;/a&gt;. I&amp;rsquo;ve already used Plex for a year or two myself, and I really like it. It&amp;rsquo;s very exciting to be working on a project I personally like with a small team of very cool people. I&amp;rsquo;m looking forward to it a lot.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RailsConf 2010 Bundler Talk Slides</title>
   <link href="http://andre.arko.net/2010/06/09/railsconf-2010-bundler-talk-slides/"/>
   <updated>2010-06-09T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/06/09/railsconf-2010-bundler-talk-slides</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;bundler.001.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.001.jpg&quot; alt=&quot;bundler.001&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.002.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.002.jpg&quot; alt=&quot;bundler.002&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.003.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.003.jpg&quot; alt=&quot;bundler.003&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.004.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.004.jpg&quot; alt=&quot;bundler.004&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.005.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.005.jpg&quot; alt=&quot;bundler.005&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.006.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.006.jpg&quot; alt=&quot;bundler.006&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.007.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.007.jpg&quot; alt=&quot;bundler.007&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.008.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.008.jpg&quot; alt=&quot;bundler.008&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.009.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.009.jpg&quot; alt=&quot;bundler.009&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.010.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.010.jpg&quot; alt=&quot;bundler.010&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.011.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.011.jpg&quot; alt=&quot;bundler.011&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.012.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.012.jpg&quot; alt=&quot;bundler.012&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.013.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.013.jpg&quot; alt=&quot;bundler.013&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.014.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.014.jpg&quot; alt=&quot;bundler.014&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.015.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.015.jpg&quot; alt=&quot;bundler.015&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.016.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.016.jpg&quot; alt=&quot;bundler.016&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.017.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.017.jpg&quot; alt=&quot;bundler.017&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.018.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.018.jpg&quot; alt=&quot;bundler.018&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.019.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.019.jpg&quot; alt=&quot;bundler.019&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.020.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.020.jpg&quot; alt=&quot;bundler.020&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.021.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.021.jpg&quot; alt=&quot;bundler.021&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.022.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.022.jpg&quot; alt=&quot;bundler.022&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.023.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.023.jpg&quot; alt=&quot;bundler.023&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.024.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.024.jpg&quot; alt=&quot;bundler.024&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.025.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.025.jpg&quot; alt=&quot;bundler.025&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.026.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.026.jpg&quot; alt=&quot;bundler.026&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.027.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.027.jpg&quot; alt=&quot;bundler.027&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Slides from my Bundler talk at the Red Dirt Ruby Conference</title>
   <link href="http://andre.arko.net/2010/05/09/slides-from-my-bundler-talk-at-the-red-dirt-ruby-conference/"/>
   <updated>2010-05-09T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/05/09/slides-from-my-bundler-talk-at-the-red-dirt-ruby-conference</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;bundler.001.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.001.jpg&quot; alt=&quot;bundler.001&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.002.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.002.jpg&quot; alt=&quot;bundler.002&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.003.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.003.jpg&quot; alt=&quot;bundler.003&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.004.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.004.jpg&quot; alt=&quot;bundler.004&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.005.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.005.jpg&quot; alt=&quot;bundler.005&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.006.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.006.jpg&quot; alt=&quot;bundler.006&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.007.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.007.jpg&quot; alt=&quot;bundler.007&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.008.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.008.jpg&quot; alt=&quot;bundler.008&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.009.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.009.jpg&quot; alt=&quot;bundler.009&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.010.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.010.jpg&quot; alt=&quot;bundler.010&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.011.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.011.jpg&quot; alt=&quot;bundler.011&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.012.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.012.jpg&quot; alt=&quot;bundler.012&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.013.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.013.jpg&quot; alt=&quot;bundler.013&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.014.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.014.jpg&quot; alt=&quot;bundler.014&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.015.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.015.jpg&quot; alt=&quot;bundler.015&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.016.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.016.jpg&quot; alt=&quot;bundler.016&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.017.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.017.jpg&quot; alt=&quot;bundler.017&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.018.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.018.jpg&quot; alt=&quot;bundler.018&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.019.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.019.jpg&quot; alt=&quot;bundler.019&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.020.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.020.jpg&quot; alt=&quot;bundler.020&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;bundler.021.jpg&quot; rel=&quot;facebox&quot; class=&quot;image&quot;&gt;&lt;img src=&quot;bundler.021.jpg&quot; alt=&quot;bundler.021&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bundler for gem development</title>
   <link href="http://andre.arko.net/2010/05/01/bundler-for-gem-development/"/>
   <updated>2010-05-01T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/05/01/bundler-for-gem-development</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://gembundler.com&quot;&gt;Bundler&lt;/a&gt; was written to manage the gem dependencies of ruby applications, and it has gotten to the point where it is pretty good at that. What you probably don&amp;rsquo;t know is that it can manage the gem dependencies of any gem that you are working on, as well.&lt;/p&gt;

&lt;p&gt;Tools like &lt;a href=&quot;http://github.com/technicalpickles/jeweler&quot;&gt;Jeweler&lt;/a&gt; have attempted to help with this problem in the past. Jeweler comes with a rake task that tells you if some of your gem&amp;rsquo;s dependencies aren&amp;rsquo;t installed. Bundler takes this idea one step further, allowing you to install all of your gem&amp;rsquo;s dependencies with a single command. This makes it very simple to check out a gem&amp;rsquo;s source and start working on it right away.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; While the stuff below worked in Bundler 0.9, it has been removed in 1.0. Integrating Bundler with gemspecs proved to be a fantastic idea, but the version that shipped with Bundler 0.9 had some issues. Gemspecs are executable Ruby code, and adding a dependency on the Bundler gem to your gemspec didn&amp;rsquo;t work in practice, because many machines that needed to process gemspecs didn&amp;rsquo;t have the right version of Bundler already installed.&lt;/p&gt;

&lt;p&gt;Replacing &lt;code&gt;Gem::Specification#add_bundler_dependencies&lt;/code&gt; is the &lt;code&gt;gemspec&lt;/code&gt; method for your Gemfile. You can use it like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source :rubygems
gemspec
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For more information about the &lt;code&gt;gemspec&lt;/code&gt; method and managing your gems with Bundler, please see the official docs, written by myself and the incomparable Josh Hull over on &lt;a href=&quot;http://gembundler.com/rubygems.html&quot;&gt;the official Bundler documentation site&lt;/a&gt;.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;Specifying your gem&amp;rsquo;s dependencies is simple: just like any other bundler project, you create a &lt;a href=&quot;http://gembundler.com/gemfile.html&quot;&gt;Gemfile&lt;/a&gt;. That file is some ruby code declaring the other gems that you gem needs to have installed in order to run. It will look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source :rubyforge
gem &amp;ldquo;json&amp;rdquo;

group :development do
  gem &amp;ldquo;rspec&amp;rdquo;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you have a Gemfile, you just add a couple of lines to your gemspec. Require the bundler library at the top, and then call the &lt;code&gt;add_bundler_dependencies&lt;/code&gt; method on your gemspec object. In the simplest form, it looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require &amp;lsquo;bundler&amp;rsquo;
Gem::Specification.new do |s|
  s.add_bundler_dependencies
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you&amp;rsquo;ve done that, all the gems in your gemfile that are in the default group will be added to your gem as dependencies. If you specify version requirements in the Gemfile, they will be reflected in the built gemspec. If you have gems that are only needed for development of your gem, put them in a group named :development and they will be added to your gemspec as development dependencies. Lastly, if you have gems that you want bundler to install, but not list inside the gemspec, put them in a group named anything besides :development.&lt;/p&gt;

&lt;p&gt;At this point, what I usually do is add the standard bundler snippet to the top of my spec_helper.rb file so that i can run my specs without bundle exec:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;require &amp;lsquo;rubygems&amp;rsquo;
require &amp;lsquo;bundler&amp;rsquo;
Bundler.setup
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;rsquo;s really all you need to use bundler while you develop a gem. If you have any questions, feel free to email, tweet, or ask me in #bundler on freenode.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>iPad internet via iPhone, without jailbreaking</title>
   <link href="http://andre.arko.net/2010/04/04/ipad-internet-via-iphone-without-jailbreaking/"/>
   <updated>2010-04-04T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/04/04/ipad-internet-via-iphone-without-jailbreaking</id>
   <content type="html">&lt;p&gt;I am a big fan of the &lt;a href=&quot;http://github.com/tcurdt/iProxy&quot;&gt;iProxy&lt;/a&gt; project, which lets you get your laptop online via your iPhone without having to jailbreak it, provided you are (or at least know) someone in the iPhone developer program. I got my iPad today, and took it out to the park. Once I was there, I of course instantly wanted to look something up online. To solve this problem until the iPad 3G comes out, I figured out a mildly annoying hack that will suffice for the time being. So here&amp;rsquo;s what to do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install iProxy onto your iPhone.&lt;/p&gt;

&lt;p&gt;I can&amp;rsquo;t really help you with this part, but there&amp;rsquo;s instructions in various parts of the internet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a file named &lt;code&gt;socks.pac&lt;/code&gt;, and put this in it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  function FindProxyForURL(url, host) {
    return &amp;ldquo;SOCKS 10.0.0.1:8888&amp;rdquo;;
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Upload that file to Air Sharing on your iPhone, so you can host it for the iPad later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get your iPhone and iPad onto the same wifi network.&lt;/p&gt;

&lt;p&gt;If you don&amp;rsquo;t have any networks available, you might have to create one using a laptop. Once one of them has joined, the laptop doesn&amp;rsquo;t have to be involved anymore.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up static IP addresses for the iPhone and iPad.&lt;/p&gt;

&lt;p&gt;I used 10.0.0.1 for the iPhone and 10.0.0.2 for the iPad.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch Air Sharing on the iPhone, and configure the iPad to use your socks.pac file.&lt;/p&gt;

&lt;p&gt;On the iPad, under the IP Address section, is HTTP Proxy. Choose &amp;ldquo;Auto&amp;rdquo;, and type in the URL of the file you are sharing from the iPhone. For me, that was &amp;ldquo;http://10.0.0.1/socks.pac&amp;rdquo;. Open Safari on your iPad and try to browse to a website. It will fail.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run iProxy on your iPhone, and then try to browse to a website on your iPad again. Success!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For some reason, I didn&amp;rsquo;t have very much luck getting applications other than Safari to use the SOCKS proxy that my iPhone was providing. But I was very happy to be able to surf the web on the bigger screen.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>tm, TextMate project management</title>
   <link href="http://andre.arko.net/2010/03/23/tm-textmate-project-management/"/>
   <updated>2010-03-23T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2010/03/23/tm-textmate-project-management</id>
   <content type="html">&lt;p&gt;I realized, the other day, that I always create a new TextMate project by running &lt;code&gt;mate .&lt;/code&gt; whenever I want to edit code on a project. Unfortunately, that approach has frustrating downsides like forgetting per-project ignores, open files, window positions, and sidebar arrangement. To save all that stuff, you have to save a .tmproj file somewhere. But I could never figure out where to put them, and I never managed to remember to open them later since I was already in the habit of &lt;code&gt;mate .&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One day, I tried to run &lt;code&gt;mate bundler&lt;/code&gt; and realized that I should just create a command that would open the .tmproj files for me. That way, I don&amp;rsquo;t have to remember where they are and I still get all the benefits of saving .tmproj files. So I created &lt;a href=&quot;http://github.com/indirect/tm&quot;&gt;tm&lt;/a&gt;, a little tiny ruby script that opens .tmproj files by name if you save them into ~/.tmproj. (I symlink my dotfiles out of my Dropbox, so this works across my machines, too.) If you are so inclined, &lt;code&gt;tm&lt;/code&gt; is even smart enough to wrap &lt;code&gt;mate&lt;/code&gt; transparently, with the only additions being the ability to open (and tab complete) projects by name. Pretty handy.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>iGoogleFight</title>
   <link href="http://andre.arko.net/2010/03/05/igooglefight/"/>
   <updated>2010-03-05T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2010/03/05/igooglefight</id>
   <content type="html">&lt;p&gt;I was horrified and dismayed to learn, the other week, that &lt;a href=&quot;http://googlefight.com&quot;&gt;GoogleFight&lt;/a&gt; uses flash to present the results of fights. This meant I couldn&amp;rsquo;t use it on my iPhone, which was horrible. So I built a &lt;a href=&quot;http://www.jqtouch.com/&quot;&gt;jQTouch&lt;/a&gt; app, backed by &lt;a href=&quot;http://www.sinatrarb.com/&quot;&gt;Sinatra&lt;/a&gt;. It handles all of my Google-fighting needs in style, and without any Flash whatsoever.&lt;/p&gt;

&lt;p&gt;So, without any further ado, I present:&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://igooglefight.com&quot;&gt;iGoogleFight.com&lt;/a&gt;&lt;/h3&gt;
</content>
 </entry>
 
 <entry>
   <title>Bundler 0.9 and Rails 2.3.5</title>
   <link href="http://andre.arko.net/2010/02/13/using-bundler-09-with-rails-235/"/>
   <updated>2010-02-13T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2010/02/13/using-bundler-09-with-rails-235</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://github.com/carlhuda/bundler&quot;&gt;Bundler&lt;/a&gt; 0.9 is out, and people have been having trouble getting it working with Rails 2.3.5 applications. In order to help with that, I&amp;rsquo;ll be keeping this blog post updated with the latest instructions on converting a Rails 2.3.5 application over to use Bundler 0.9.&lt;/p&gt;

&lt;p&gt;The first step in converting is to tweak the configuration and startup files in your app. You&amp;rsquo;ll need to add a monkeypatch to your app&amp;rsquo;s &lt;code&gt;config/boot.rb&lt;/code&gt; file:&lt;/p&gt;

&lt;script src=&quot;http://gist.github.com/302406.js?file=boot.rb&quot;&gt;&lt;/script&gt;

&lt;p&gt;Next, you&amp;rsquo;ll need to add a new file at &lt;code&gt;config/preinitializer.rb&lt;/code&gt;, and put this into it:&lt;/p&gt;

&lt;script src=&quot;http://gist.github.com/302406.js?file=preinitializer.rb&quot;&gt;&lt;/script&gt;

&lt;p&gt;Last, you&amp;rsquo;ll need to move your gem requirements list from &lt;code&gt;config/environment.rb&lt;/code&gt; to your &lt;code&gt;Gemfile&lt;/code&gt;. Here&amp;rsquo;s an example &lt;code&gt;Gemfile&lt;/code&gt;:&lt;/p&gt;

&lt;script src=&quot;http://gist.github.com/302406.js?file=Gemfile&quot;&gt;&lt;/script&gt;

&lt;p&gt;By the time you have finished, there shouldn&amp;rsquo;t be any &lt;code&gt;config.gem&lt;/code&gt; statements left in your &lt;code&gt;environment.rb&lt;/code&gt; file. All the gems that your application depends on should be listed in your &lt;code&gt;Gemfile&lt;/code&gt; instead. If you have gems that should only be loaded in certain environments, like development-only or test-only gems, you can put those in the &amp;ldquo;development&amp;rdquo; and &amp;ldquo;test&amp;rdquo; groups.&lt;/p&gt;

&lt;p&gt;When you&amp;rsquo;re done, you can install your gems and record the specific versions that you are using, so that they won&amp;rsquo;t change unexpectedly as you deploy:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bundle install
bundle lock
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After you have installed and locked your bundle, you can run Rails scripts directly. However, you &lt;em&gt;must&lt;/em&gt; run all other commands via &lt;code&gt;bundle exec&lt;/code&gt;. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./script/server
bundle exec rake db:migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When you deploy your application, you will need to run &lt;code&gt;bundle install&lt;/code&gt; as part of your deploy process, typically after your code has been updated but before you restart your app servers. If you have development gems that you can&amp;rsquo;t (or don&amp;rsquo;t want to) install on your production machine, you can run &lt;code&gt;bundle install &amp;mdash;without development&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are a lot more things you can do with the Bundler. If you want to read about them, I suggest checking out the &lt;a href=&quot;http://github.com/carlhuda/bundler/tree/master/README.markdown&quot;&gt;Bundler README&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Homebrew: OS X's Missing Package Manager</title>
   <link href="http://andre.arko.net/2010/02/02/homebrew/"/>
   <updated>2010-02-02T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2010/02/02/homebrew</id>
   <content type="html">&lt;p&gt;Managing software packages on unix is a giant pain. Most linux distributions are built around different ways to try to alleviate that pain. Over the years, there have been various attempts to create effective package managers for OS X. The two most popular efforts, &lt;a href=&quot;http://finkproject.org&quot;&gt;Fink&lt;/a&gt; and &lt;a href=&quot;http://macports.org&quot;&gt;MacPorts&lt;/a&gt;, but they certainly have their frustrations. In both cases, creating packages or portfiles can be complex and difficult.&lt;/p&gt;

&lt;p&gt;Fortunately for us, &lt;a href=&quot;http://www.methylblue.com/&quot;&gt;Max Howell&lt;/a&gt; decided that there should be a package manager that is easy to edit, and that makes creating new packages a breeze. &lt;a href=&quot;http://github.com/mxcl/homebrew&quot;&gt;Homebrew&lt;/a&gt; is that package manager.&lt;/p&gt;

&lt;h2&gt;What does it do?&lt;/h2&gt;

&lt;p&gt;Homebrew alleviates the drudgery and repetition of downloading and installing unix software packages on OS X. If you&amp;rsquo;re sick of &lt;code&gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/code&gt;, Homebrew can definitely help.&lt;/p&gt;

&lt;h2&gt;Why Homebrew?&lt;/h2&gt;

&lt;p&gt;OS X already has two package managers: &lt;a href=&quot;http://finkproject.org&quot;&gt;Fink&lt;/a&gt; and &lt;a href=&quot;http://macports.org&quot;&gt;MacPorts&lt;/a&gt;. If one of those is working for you, great. But if you&amp;rsquo;ve been frustrated by them in the past, I strongly suggest you give Homebrew a try. It&amp;rsquo;s very easy to create and edit formulae, and even to edit Homebrew itself, since the core is just a few hundred lines of Ruby code.&lt;/p&gt;

&lt;p&gt;It doesn&amp;rsquo;t impose external structure on you &amp;mdash; the default is to install it to &lt;code&gt;/usr/local&lt;/code&gt;, but you can install it anywhere. Inside your Homebrew directory, software is installed into subdirectories inside Homebrew&amp;rsquo;s cellar, like &lt;code&gt;Cellar/git/1.6.5.4/&lt;/code&gt;. After installation, Homebrew symlinks the software into the regular unix directories. If you want to hand-install a package or version that isn&amp;rsquo;t officially part of Homebrew yet, they can happily co-exist in the same location.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s usually not necessary, though, since formulae can install directly out of version control. If a package has a public git, svn, cvs, or mercurial repository, you can install the latest development version as often as you like with a simple &lt;code&gt;brew install&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Installing packages is faster, too, because Homebrew also works hard to avoid package duplication. No more installing yet another version of Perl as a package dependency when you already have a working install of Perl built in to OS X.&lt;/p&gt;

&lt;p&gt;Best of all, Homebrew has a basic philosophy that you shouldn&amp;rsquo;t have to use sudo to install or manage software on your computer.&lt;/p&gt;

&lt;h2&gt;Okay, it sounds pretty great. How do I get it?&lt;/h2&gt;

&lt;p&gt;The first (and only) dependency that Homebrew has is the OS X Developer Tools, which are on the OS X installer disc, and can be downloaded from &lt;a href=&quot;http://developer.apple.com&quot;&gt;developer.apple.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Unless you have a reason not to, the easiest place to install Homebrew is in &lt;code&gt;/usr/local&lt;/code&gt;. You can do that in just a few steps on the command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Take ownership of /usr/local so you don&amp;rsquo;t have to sudo
sudo chown -R whoami /usr/local
# Fix the permissions on your mysql installation, if you have one
sudo chown -R mysql:mysql /usr/local/mysql
# Download and install Homebrew from github
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz &amp;mdash;strip 1 -C /usr/local
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you&amp;rsquo;ve done that, you&amp;rsquo;re good to go! Assuming &lt;code&gt;/usr/local/bin&lt;/code&gt; is in your PATH, feel free to try it out:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install wget
brew info git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Homebrew wiki also has more about &lt;a href=&quot;http://wiki.github.com/mxcl/homebrew/cpan-ruby-gems-and-python-disttools&quot;&gt;integrating with RubyGems, CPAN, and Python&amp;rsquo;s EasyInstall&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Keeping your copy of Homebrew up to date is easy:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install git
brew update
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you have git installed, you can just run &lt;code&gt;brew update&lt;/code&gt; anytime you want to pull down the latest formulae.&lt;/p&gt;

&lt;h2&gt;Contributing&lt;/h2&gt;

&lt;p&gt;Creating a new formula is almost that easy. If Homebrew didn&amp;rsquo;t have a formula for wget, you could create one like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew create http://ftp.gnu.org/gnu/wget/wget-1.12.tar.bz2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After you save your formula, you can test it out with &lt;code&gt;brew install -vd wget&lt;/code&gt;, to enable verbose logging and debug mode. If you need help getting your formula working, there is more documentation on the &lt;a href=&quot;http://wiki.github.com/mxcl/homebrew/contributing&quot;&gt;Homebrew wiki&lt;/a&gt;. You can also learn by example from already existing formula, like &lt;a href=&quot;http://github.com/mxcl/homebrew/tree/master/Library/Formula/git.rb&quot;&gt;git&lt;/a&gt; or &lt;a href=&quot;http://github.com/mxcl/homebrew/tree/master/Library/Formula/flac.rb&quot;&gt;flac&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can check out lots of example formulae, and Homebrew&amp;rsquo;s internals, by running &lt;code&gt;brew edit&lt;/code&gt;. The code is pretty straightforward. If you have questions, or are interested in future plans, the contributors to Homebrew tend to hang out in the #machomebrew channel on Freenode.&lt;/p&gt;

&lt;p&gt;Once you have a working new formula, it&amp;rsquo;s easy to create your own fork of Homebrew on github to push your new formula to, by using the github gem.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git add .
git commit -m &amp;ldquo;Added a formula for wget&amp;rdquo;
gem install json github
github fork
git push &amp;lt;your github username&amp;gt; mastergitx
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After pushing your change to github, go to the &lt;a href=&quot;http://github.com/mxcl/homebrew/issues&quot;&gt;Homebrew issue tracker&lt;/a&gt; and create a ticket with the subject &amp;ldquo;New formula: &lt;software name&gt;&amp;rdquo;. Assuming everything checks out, your formula will be added to the main Homebrew repository and available for everyone else to use.&lt;/p&gt;

&lt;h2&gt;Wrapping up&lt;/h2&gt;

&lt;p&gt;Homebrew is a compelling alternative to MacPorts and Fink. Both the Homebrew core and all the formulae are written in ruby, so it&amp;rsquo;s easy to add new packages or even new features. If you&amp;rsquo;re looking for more control over the unix software you have installed on your Mac, or you&amp;rsquo;ve been frustrated by other package managers in the past, check it out. I think you&amp;rsquo;ll be happily surprised.&lt;/p&gt;

&lt;p class=&quot;aside&quot;&gt;This post was originally written for, and posted to, the &lt;a href=&quot;http://www.engineyard.com/blog/2010/homebrew-os-xs-missing-package-manager/&quot;&gt;Engine Yard Blog&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>TextMate strip whitespace and preserve cursor position</title>
   <link href="http://andre.arko.net/2009/12/27/textmate-strip-whitespace-and-preserve-cursor-position/"/>
   <updated>2009-12-27T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2009/12/27/textmate-strip-whitespace-and-preserve-cursor-position</id>
   <content type="html">&lt;p&gt;There are a lot of bundles and macros out there that exist solely to strip trailing whitespace from the current file whenever you save it. Unfortunately, (almost) all of the whitespace stripping options that I have found share a fatal flaw: they move the cursor to the beginning of the line. This seriously messes with my head, as I never expect saving the file to move the cursor.&lt;/p&gt;

&lt;p&gt;I somehow wound up with a bundle that doesn&amp;rsquo;t move the cursor while it strips whitespace, so I&amp;rsquo;m posting it here for myself (and anyone else who doesn&amp;rsquo;t like their cursor jumping around).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;Strip%20Whitespace%20on%20Save.zip&quot;&gt;Strip whitespace on save bundle for TextMate&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Gem bundler support in TextMate's RSpec bundle</title>
   <link href="http://andre.arko.net/2009/12/22/gem-bundler-support-in-textmates-rspec-bundle/"/>
   <updated>2009-12-22T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2009/12/22/gem-bundler-support-in-textmates-rspec-bundle</id>
   <content type="html">&lt;p&gt;For the last couple of weeks, I&amp;rsquo;ve been working with Merb and Rails 3 apps that use the &lt;a href=&quot;http://github.com/wycats/bundler&quot;&gt;gem bundler&lt;/a&gt;. To my dismay, Textmate&amp;rsquo;s RSpec bundle doesn&amp;rsquo;t know how to run specs in bundled apps. The bundler doesn&amp;rsquo;t come with a way to automatically load its environment yet, so I resorted to a hacky check for a Gemfile. It&amp;rsquo;s working perfectly for me, though, in both Merb and Rails 3 apps.&lt;/p&gt;

&lt;p&gt;So if you&amp;rsquo;re using the gem bundler, I suggest installing &lt;a href=&quot;http://github.com/indirect/rspec-tmbundle&quot;&gt;Bundled RSpec.tmbundle&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Starting a Rails 3 app from scratch</title>
   <link href="http://andre.arko.net/2009/12/21/starting-a-rails-3-app-from-scratch/"/>
   <updated>2009-12-21T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2009/12/21/starting-a-rails-3-app-from-scratch</id>
   <content type="html">&lt;p&gt;There&amp;rsquo;s not much in the way of documentation on using Rails 3 at the moment, so I thought I&amp;rsquo;d collect my notes from getting a new app up and running so other people could use them as well.&lt;/p&gt;

&lt;p&gt;First thing you need is the bundler gem, to save you from gem dependency hell (hurrah):&lt;/p&gt;

&lt;p&gt;gem install bundler&lt;/p&gt;

&lt;h3&gt;A new Rails app&lt;/h3&gt;

&lt;p&gt;Then you need an app. Assuming that your app is named &amp;ldquo;myapp&amp;rdquo; (which is a pretty bad assumption), here&amp;rsquo;s what you might do:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mkdir myapp
cd myapp
curl -o Gemfile http://andre.arko.net/2009/12/21/starting-a-rails-3-app-from-scratch/Gemfile.example
gem bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That creates a new directory for your app, pulls down a (sort of) minimal Gemfile, and then tells the bundler to bundle up Rails and all its dependencies for you to use in this app.&lt;/p&gt;

&lt;p&gt;Then you&amp;rsquo;ll want to use the copy of Rails that you just bundled to generate the default app structure, like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./bin/rails .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When it asks you if you want to overwrite the Gemfile, you know what to do: just say &lt;code&gt;n&lt;/code&gt;, kids.&lt;/p&gt;

&lt;p&gt;After you&amp;rsquo;re done, I suggest running &lt;code&gt;./script/about&lt;/code&gt; to make sure that all the bundling went well and Rails can load and all that good stuff. Assuming it works, you have yourself a new Rails 3 app! And without installing any system gems. How about that.&lt;/p&gt;

&lt;h3&gt;Gems and generators and ooh shiny&lt;/h3&gt;

&lt;p&gt;At this point, you are pretty much set, and can run off and make your app do whatever it is that your heart desires. However, there are some more cool edgy things available, should you be interested. My current set of goodies includes Rack::Bug, Thor, RSpec, DataMapper, respond_to scaffolds. Most of these goodies were inspired (or just copied) from github.com/josevalim/third_rails.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;To get their gems installed, uncomment the lines in the Gemfile and the run &lt;code&gt;gem bundle&lt;/code&gt; again to install them all.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Export the generators into &lt;code&gt;lib/generators&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; git clone git://github.com/indirect/rails3-generators.git lib/generators
 rm -rf lib/generators/.git
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To enable the generators, put these lines into your &lt;code&gt;config/application.rb&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; config.generators do |g|
   g.scaffold_controller :responders_controller
   g.orm                 :datamapper
   g.template_engine     :erb, :layout =&amp;gt; true
   g.test_framework      :rspec,
                         :fixtures =&amp;gt; true,
                         :integration_tool =&amp;gt; false,
                         :routes =&amp;gt; true,
                         :views =&amp;gt; false
   g.integration_tool    :rspec
 end
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switching to RSpec is then pretty easy:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; ./script/generate rspec:install
 rm -rf test
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thor needs a Thorfile, and can replace the Rakefile that Rails included with your app.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; curl -o Thorfile http://andre.arko.net/2009/12/21/starting-a-rails-3-app-from-scratch/Thorfile.example
 rm Rakefile
 thor -T
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rack::Bug is just a plugin, so it&amp;rsquo;s pretty easy.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; script/plugin install git://github.com/brynary/rack-bug.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, in &lt;code&gt;config/development.rb&lt;/code&gt;, add this line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; config.middleware.use &amp;ldquo;Rack::Bug&amp;rdquo;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because ActionView#render_templates has been removed, I had to comment out the TemplatesPanel in &lt;code&gt;rack/bug/options.rb:80&lt;/code&gt; for rack-bug to work. I imagine the bug will be fixed relatively quickly, though.&lt;/p&gt;

&lt;h3&gt;Git it done already&lt;/h3&gt;

&lt;p&gt;This is probably a good time to start tracking your app in source control:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git init
curl -o .gitignore http://andre.arko.net/2009/12/21/starting-a-rails-3-app-from-scratch/gitignore.example
git add .
git commit -m &amp;ldquo;New Rails 3 app with bundled gems&amp;rdquo;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;TextMate with Rspec Bundle&lt;/h3&gt;

&lt;p&gt;Lastly, if you want to use RSpec from TextMate in the manner to which you have (likely) become accustomed, you will need to install a new version of RSpec.tmbundle that has support for libraries installed via the bundler.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd ~/Library/Application\ Support/TextMate/Bundles/
git clone git://github.com/indirect/rspec-tmbundle.git RSpec.tmbundle
osascript -e &amp;lsquo;tell app &amp;ldquo;TextMate&amp;rdquo; to reload bundles&amp;rsquo;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Phew.&lt;/h3&gt;

&lt;p&gt;If you&amp;rsquo;ve actually made it all the way here, I&amp;rsquo;m terribly impressed. If for some reason you want to follow along with these steps, you can check out my &lt;a href=&quot;http://github.com/indirect/rails3-app&quot;&gt;blank Rails 3 app&lt;/a&gt; repository at Github. Have fun with Rails 3!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Git branch in prompt (with svn support)</title>
   <link href="http://andre.arko.net/2007/12/19/git-branch-in-prompt-with-svn-support/"/>
   <updated>2007-12-19T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2007/12/19/git-branch-in-prompt-with-svn-support</id>
   <content type="html">&lt;p&gt;I like &lt;a href=&quot;http://acts.as.streeteasy.com/archives/2007/12/19/git_in_your_prompt/&quot;&gt;having my git branch in my prompt&lt;/a&gt;, but I sadly still have to use subversion sometimes. So, I hacked something together (mostly out of &lt;a href=&quot;http://web.glandium.org/blog/?p=170&quot;&gt;this script for vcs info in your prompt&lt;/a&gt;) that gives either the current git branch or the current svn revision. In my .bash_profile, I include &lt;a href=&quot;http://arko.net/files/blog/vcs-prompt.bash&quot;&gt;this file&lt;/a&gt; with `source ~/sw/bash/vcs-prompt.bash`.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>iPhone keychain (equivalent)</title>
   <link href="http://andre.arko.net/2007/07/11/iphone-keychain-equivalent/"/>
   <updated>2007-07-11T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2007/07/11/iphone-keychain-equivalent</id>
   <content type="html">&lt;p&gt;So, I got an iPhone. Yay. And then I was utterly crushed, because it dosen&amp;#8217;t have Keychain. At all. No password remembering for you, Safari Mobile user!&lt;/p&gt;
&lt;p&gt;I was even more crushed when I realized that almost all of my passwords are unique per-site jumbles of numbers and letters, thanks to Nic Wolff&amp;#8217;s &lt;a href=&quot;http://angel.net/~nic/passwd.html&quot;&gt;Password Generator&lt;/a&gt;. But! (And this is a really, amazingly huge but!) The password generator bookmarklet that I already use in Safari, in the Bookmarks bar, works on my iPhone!&lt;/p&gt;
&lt;p&gt;So, I don&amp;#8217;t actually have to remember my passwords. All I have to do is hit the bookmarks button and then tap on my bookmarklet (which synced over from Safari on my laptop). The bookmarklet does the JavaScript magic needed to generate my per-site password from my master password and the site&amp;#8217;s domain name, and fills it in to the password blank for me. Totally awesome.&lt;/p&gt;
&lt;p&gt;So after all that, it turns out that the sites I &lt;em&gt;don&amp;#8217;t&lt;/em&gt; use a unique password for are the ones that are going to suck, since I&amp;#8217;ll have to type it in every time. Figures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Okay, sorry, the bookmarklet is near the bottom of &lt;a href=&quot;http://angel.net/~nic/passwdlet.html&quot;&gt;this page&lt;/a&gt;. You want the &amp;#8220;master password&amp;#8221; version, so you can fill in passwords on your iPhone without lots of typing.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Wiiiiiiiiiiiiiiiiiiiiiiiiii</title>
   <link href="http://andre.arko.net/2006/11/27/wiiiiiiiiiiiiiiiiiiiiiiiiii/"/>
   <updated>2006-11-27T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/11/27/wiiiiiiiiiiiiiiiiiiiiiiiiii</id>
   <content type="html">&lt;p&gt;:)&lt;/p&gt;
&lt;p&gt;It is difficult to describe the awesomeness. If you want to friend me, post or email me your code.&lt;/p&gt;
&lt;p&gt;6891 7336 6203 5735&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>typo permalinks in Mephisto 0.7</title>
   <link href="http://andre.arko.net/2006/10/20/typo-permalinks-in-mephisto-0-7/"/>
   <updated>2006-10-20T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/10/20/typo-permalinks-in-mephisto-0-7</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; This was definitely not the best solution. As Rick Olsen points out below, it&amp;#8217;s possible to change the permalink style to /articles/:year/:month/:day in the settings. If you want to use Mephisto style URLs, but have Mephisto redirect Typo style permalinks, you add one line at the bottom of your &lt;code&gt;environment.rb&lt;/code&gt; file:&lt;/p&gt;
&lt;p&gt;Liquid error: No such file or directory &amp;#8211; posix_spawnp&lt;/p&gt;
&lt;p&gt;It turns out that &lt;a href=&quot;http://mephistoblog.com&quot;&gt;Mephisto 0.7&lt;/a&gt; adds a highly sophisticated (and pretty damn confusing) dispatching system. This means that simply adding a route that matches Typo permalinks isn&amp;#8217;t enough anymore. I wound up having to edit the lib/mephisto/dispatch.rb file, like so:&lt;/p&gt;
&lt;p&gt;Liquid error: No such file or directory &amp;#8211; posix_spawnp&lt;/p&gt;
&lt;p&gt;The center line is the only new one. Hopefully that helps.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>error 418</title>
   <link href="http://andre.arko.net/2006/10/20/error-418/"/>
   <updated>2006-10-20T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/10/20/error-418</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; Under what circumstances should you return error number 418: &amp;#8220;I&amp;#8217;m a teapot&amp;#8221;?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; Any attempt to brew coffee with a teapot according to &lt;span class=&quot;caps&quot;&gt;RFC&lt;/span&gt; 2324, &amp;#8220;Hyper Text Coffee Pot Control Protocol.&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://infohost.nmt.edu/~val/tcpip.html&quot;&gt;The &lt;span class=&quot;caps&quot;&gt;TCP&lt;/span&gt;/IP Drinking Game&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails Core Q&amp;A Session</title>
   <link href="http://andre.arko.net/2006/06/26/rails-core-q-amp-a-session/"/>
   <updated>2006-06-26T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/06/26/rails-core-q-amp-a-session</id>
   <content type="html">&lt;p&gt;&amp;#8220;it&amp;#8217;s like brain calisthenics&amp;#8221; &amp;#8211; marcel&lt;/p&gt;
&lt;p&gt;&amp;#8220;education through patches, please&amp;#8221; &amp;#8211; david&lt;/p&gt;
&lt;p&gt;&amp;#8220;i hate fixtures&amp;#8221; &amp;#8211; marcel&lt;/p&gt;
&lt;p&gt;&amp;#8220;rails &lt;em&gt;does&lt;/em&gt; have to talk to the database&amp;#8221; &amp;#8211; jeremy&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>_why the lucky stiff and The Thirsty Cups</title>
   <link href="http://andre.arko.net/2006/06/24/_why-the-lucky-stiff-and-the-thirsty-cups/"/>
   <updated>2006-06-24T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/06/24/_why-the-lucky-stiff-and-the-thirsty-cups</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;http://arko.net/files/_why.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;_why&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;#8220;it&amp;#8217;s like&amp;#8230; Windows XP outside today.&amp;#8221;&lt;/p&gt;
&lt;p&gt;&amp;#8220;okay, okay, I know what you&amp;#8217;re thinking&amp;#8230; put your best practices &lt;em&gt;away&lt;/em&gt;&amp;#8221;&lt;/p&gt;
&lt;p&gt;&amp;#8220;[10, 20, 30].each &amp;amp;4.method(:-)&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;the least surprised&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;#8220;It&amp;#8217;s like Lexical Luthor is shoving vocabulary kryptonite into my thesaurus gland, here.&amp;#8221;&lt;/p&gt;
&lt;p&gt;&amp;#8220;I had no idea how much idolatry I had been party to, and on company time!&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;_why again&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;#8220;Innovative. Groundbreaking. Web 0.0.&amp;#8221;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>RailsConf Day 0</title>
   <link href="http://andre.arko.net/2006/06/23/railsconf-day-0/"/>
   <updated>2006-06-23T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/06/23/railsconf-day-0</id>
   <content type="html">&lt;p&gt;RailsConf is cool; many caboosers are present, and they are also cool. Caboosers got business cards. They are cool business cards, with monkeys on them.&lt;/p&gt;
&lt;p&gt;Chicago is not cool, but not too hot, either. About 80&amp;#8211;85&amp;deg;.&lt;/p&gt;
&lt;p&gt;Went to dinner at Giordano&amp;#8217;s, and ate stuffed-crust Chicago-style pizza. It was delicious.&lt;/p&gt;
&lt;p&gt;Lots of people had DS Lites, including Amy Hoy and Tobias Luetke; much MarioKart was played. I won twice.&lt;/p&gt;
&lt;p&gt;I have started working in earnest on a rails app I will probably manage to finish and release. Releasing is good. This conference is going to be fun. Woohoo.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Graduated</title>
   <link href="http://andre.arko.net/2006/05/29/graduated/"/>
   <updated>2006-05-29T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/05/29/graduated</id>
   <content type="html">&lt;p&gt;Hurray. Graduated. Now all I have to do is figure out how to get them to give me my diploma&amp;#8230;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Google Analytics</title>
   <link href="http://andre.arko.net/2006/05/10/google-analytics/"/>
   <updated>2006-05-10T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/05/10/google-analytics</id>
   <content type="html">&lt;p&gt;Finally, finally, Google has seen fit (or gotten around to installing enough servers) that they sent me a Google Analytics invitation code. Soon, I will again have access to all the web site statistics I&amp;#8230; already had 8 months ago, until Google &lt;a href=&quot;http://simplicio.com/index.php?id=4&quot;&gt;took them away&lt;/a&gt;. Bah.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Mac Mini and Sony Bravia XBR issues</title>
   <link href="http://andre.arko.net/2006/05/06/mac-mini-and-sony-bravia-xbr-issues/"/>
   <updated>2006-05-06T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/05/06/mac-mini-and-sony-bravia-xbr-issues</id>
   <content type="html">&lt;p&gt;A lot of people seem to be having ever so much trouble getting their Mac Minis to use their Sony Bravia &lt;span class=&quot;caps&quot;&gt;LCD&lt;/span&gt; Televisions as displays. For some reason, when connected to a Mini via an &lt;span class=&quot;caps&quot;&gt;HDMI&lt;/span&gt;-to-&lt;span class=&quot;caps&quot;&gt;DVI&lt;/span&gt; cable, the Bravia appears to the Mini to have a native resolution of 1280&amp;#215;720. While that is, in fact, a 16:9 resolution, it leaves anyone wanting a good-looking picture in the dust. Unfortunately, the Mini only has two options: overscan mode, which pushes the menu bar and the dock off the screen, or no overscan, which makes the picture significantly smaller than the television is, leaving a couple of inches of black all around.&lt;/p&gt;
&lt;p&gt;After downloading SwitchResX and DisplayConfigX, and a couple of hours of Googling, I discovered that &lt;span class=&quot;caps&quot;&gt;HDMI&lt;/span&gt; ports on Bravia TVs just don&amp;#8217;t seem to like any resolutions except 1280&amp;#215;720. After the third attempt that just resulted in a black screen, it occurred to me that I might try using the &amp;#8220;&lt;span class=&quot;caps&quot;&gt;RGB&lt;/span&gt;/PC&amp;#8221; input on the Bravia, which is actually a standard &lt;span class=&quot;caps&quot;&gt;VGA&lt;/span&gt; port. After plugging the &lt;span class=&quot;caps&quot;&gt;VGA&lt;/span&gt; cable into the TV on one end and the Mini&amp;#8217;s &lt;span class=&quot;caps&quot;&gt;DVI&lt;/span&gt; to &lt;span class=&quot;caps&quot;&gt;VGA&lt;/span&gt; adapter on the other end, I restarted the Mini to discover&amp;#8230; a perfect screen. At 1366&amp;#215;768, the Bravia&amp;#8217;s native resolution, no less. The computer is sending 1 pixel for every pixel on the TV. Front Row is beautiful, and &lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt; Player fills the whole screen. Hurrah.&lt;/p&gt;
&lt;p&gt;Hopefully this will help all the people out there looking for instructions on how to set up a custom resolution to force their TV to work with their Mini, since it turns out you don&amp;#8217;t need to at all.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a picture of the full-resolution, full-screen result:&lt;br /&gt;
&lt;img src=&quot;http://arko.net/files/bravia.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>DS Lite</title>
   <link href="http://andre.arko.net/2006/05/05/ds-lite/"/>
   <updated>2006-05-05T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/05/05/ds-lite</id>
   <content type="html">&lt;p&gt;I have no idea why I didn&amp;#8217;t think to post this sooner.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://arko.net/files/dslite.jpg&quot;&gt;&lt;img src=&quot;http://arko.net/files/dslite_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Way. Cool.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>New Car</title>
   <link href="http://andre.arko.net/2006/05/03/new-car/"/>
   <updated>2006-05-03T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/05/03/new-car</id>
   <content type="html">&lt;p&gt;Well, I really don&amp;#8217;t know what to say, exactly, so I&amp;#8217;ll just show you a picture:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://arko.net/files/mini.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;It would be a picture of my actual car, but my camera decided to break this week. Sigh.&lt;/p&gt;
&lt;p&gt;The car, however, is totally sweet.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The time Tim Bray crashed AOL</title>
   <link href="http://andre.arko.net/2006/04/11/the-time-tim-bray-crashed-aol/"/>
   <updated>2006-04-11T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/04/11/the-time-tim-bray-crashed-aol</id>
   <content type="html">&lt;p&gt;I&amp;#8217;m not sure exactly why, but I find it really, really amusing that Tim Bray managed to (well, at least it certainly looks like he did) &lt;a href=&quot;http://www.tbray.org/ongoing/When/200x/2003/03/18/AOL&quot;&gt;crash &lt;span class=&quot;caps&quot;&gt;AOL&lt;/span&gt; entirely&lt;/a&gt;, back in 1988.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Phokus Theme Tweaks</title>
   <link href="http://andre.arko.net/2006/04/06/phokus-theme-tweaks/"/>
   <updated>2006-04-06T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2006/04/06/phokus-theme-tweaks</id>
   <content type="html">&lt;p&gt;After the dismaying realization that posting a comment made the entire site explode, I went and tweaked my new theme (Phokus, by &lt;a href=&quot;http://phonophunk.com/typo-themes/&quot;&gt;John Serris&lt;/a&gt;). After getting it working with the newest version of typo, I discovered that (of course) &lt;a href=&quot;http://paul.annesley.cc/articles/2006/04/03/patch-for-phokus-typo-theme&quot;&gt;someone else&lt;/a&gt; had beaten me to it. However, in the course of editing, I discovered that comment previewing was disabled, so I added it as well. The comment box now includes a  &amp;#8220;Preview Comment&amp;#8221; link, and by clicking it you can see what your comment will look like before you commit.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re interested, feel free to download the &lt;a href=&quot;http://arko.net/files/phokus.diff&quot;&gt;phokus patch file&lt;/a&gt; or the &lt;a href=&quot;http://arko.net/files/phokus.zip&quot;&gt;updated version of phokus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;http://paul.annesley.cc/&quot;&gt;Paul Annesley&lt;/a&gt; pointed out (thanks, Paul) that I was inadvertently preventing extended content from showing up, even in the detailed view. That bug is now fixed, so please download the updated Phokus again if you had done so already.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update redux:&lt;/strong&gt; Metadata for my version of the theme is changed, so you can tell Phokus-tweaked apart from the original Phokus. Additionally, the javascript that adds a feed icon to rss and atom links also operates on links to .ics iCalendar files.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails Newbie Bootstrapping Guide</title>
   <link href="http://andre.arko.net/2006/03/26/rails-newbie-bootstrapping-guide/"/>
   <updated>2006-03-26T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/03/26/rails-newbie-bootstrapping-guide</id>
   <content type="html">&lt;h3&gt;Help! What is rails, anyway?&lt;/h3&gt;
&lt;h4&gt;Aren&amp;#8217;t those for trains?&lt;/h4&gt;
&lt;p&gt;Wondering what the &amp;#8220;Ruby on Rails&amp;#8221; thing is, and wondering if you might like it, but feeling lost when people say you should &amp;#8220;just gem install rails and the database server of your choice&amp;#8221;? You&amp;#8217;re probably at the right place.&lt;/p&gt;
&lt;p&gt;This post aims to be a guidebook that help you find the obvious (and not so obvious) online and real-world resources you need to get going with Ruby on Rails. Even if you don&amp;#8217;t really understand web development, the resources listed here will help you come to an understanding of web sites, web development, Ruby, and Ruby on Rails.&lt;/p&gt;
&lt;p&gt;If there are any steps on this list that you already know, just skip them and move on to the next section and you should be fine. Okay, here we go.&lt;/p&gt;
&lt;h3&gt;The Vast Internet Wasteland&lt;/h3&gt;
&lt;div class=&quot;sidebar&quot;&gt;
&lt;h4&gt;Designer&amp;#8217;s note&lt;/h4&gt;
&lt;p&gt;
&lt;p&gt;If you&amp;#8217;re primarily a designer, or want to be, some suggested further reading includes &lt;a href=&quot;http://www.amazon.com/gp/product/0321303474/&quot;&gt;&lt;em&gt;The Zen of &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; Design&lt;/em&gt;&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/gp/product/1590593812/&quot;&gt;&lt;em&gt;Web Standards Solutions&lt;/em&gt;&lt;/a&gt;, and &lt;a href=&quot;http://www.amazon.com/gp/product/073571245X/&quot;&gt;&lt;em&gt;Eric Myer on &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;. Then, you&amp;#8217;ll want to read &lt;a href=&quot;http://glu.ttono.us/articles/2006/03/21/rails-for-designers&quot;&gt;A Designer&amp;#8217;s Guide to Rails&lt;/a&gt;. After that, while it&amp;#8217;s a good idea to check out the Rails material, you won&amp;#8217;t need to worry so much about the Ruby stuff, if you have coder(s) on your team to do that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Before you learn Rails, you&amp;#8217;ll need to have a pretty good grasp of some other things. The biggest ones are &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;XHTML&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;, the foundational standards of the world wide web. A good place to start learning about them is at the W3C Schools &lt;a href=&quot;http://www.w3schools.com/xhtml/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XHTML&lt;/span&gt; tutorial&lt;/a&gt; and &lt;a href=&quot;http://www.w3schools.com/css/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; Tutorial&lt;/a&gt;. Once you&amp;#8217;ve completed those tutorials, you should have enough of an understanding to experiment, learn things, and move on to Ruby and Rails.&lt;/p&gt;
&lt;p&gt;If you want a more in-depth treatment, or like dead-tree reference material, try the books on the subject published by O&amp;#8217;Reilly publishers: &lt;a href=&quot;http://www.amazon.com/gp/product/059600026X/&quot;&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; &amp;amp; &lt;span class=&quot;caps&quot;&gt;XHTML&lt;/span&gt;&lt;/em&gt;&lt;/a&gt; and &lt;a href=&quot;http://www.amazon.com/gp/product/0596005253/&quot;&gt;&lt;em&gt;Cascading Style Sheets&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Make Your Choice&lt;/h3&gt;
&lt;p&gt;Once you&amp;#8217;ve got a grasp on the basics of web pages, you can choose whether you want to learn Ruby or Rails next. Although Rails makes heavy use of Ruby, you can still construct relatively simple webapps without knowing Ruby. I&amp;#8217;ll put the Ruby material first, but feel free to skip them and come back to them later, when you want to do more complicated programming inside Rails.&lt;/p&gt;
&lt;h3&gt;Ruby&lt;/h3&gt;
&lt;h4&gt;Making programmers smile, all over the world&lt;/h4&gt;
&lt;div class=&quot;sidebar&quot; style=&quot;float: left;&quot;&gt;
&lt;h4&gt;Installing Ruby&lt;/h4&gt;
&lt;p&gt;Installing Ruby can be a pain, but some nice ruby-fans have gone to the trouble to package it up as an installer for most operating systems. If you are running WindowsXP, you can use the &lt;a href=&quot;http://rubyinstaller.rubyforge.org/&quot;&gt;RubyInstaller&lt;/a&gt;. If you&amp;#8217;re running Mac OS X, Ruby comes with your computer, and you can start using it just by opening the Terminal program and running the command &amp;#8220;irb&amp;#8221;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To learn Ruby, there are two main starting points: &lt;a href=&quot;http://poignantguide.net/ruby/&quot;&gt;Why&amp;#8217;s Poignant Guide&lt;/a&gt;, and &lt;a href=&quot;http://www.rubycentral.com/book/&quot;&gt;&lt;em&gt;Programming Ruby: The Pragmatic Guide&lt;/em&gt;&lt;/a&gt;. The Poignant Guide to Ruby is a very readable (and amusing) introduction to the Ruby language. Why has also written an interactive website that allows you to start writing ruby programs without even installing it on your computer, called &lt;a href=&quot;http://tryruby.hobix.com&quot;&gt;Try Ruby&lt;/a&gt; Programming Ruby is more straightforward (pragmatic, even), and approaches Ruby more systematically. The complete text of the first edition is online, and is a great resource for getting started.&lt;/p&gt;
&lt;p&gt;Once you&amp;#8217;ve become acquainted with Ruby, you&amp;#8217;ll probably want to refer to the &lt;a href=&quot;http://ruby-doc.org/core/&quot;&gt;Ruby language documentation&lt;/a&gt; and the &lt;a href=&quot;http://ruby-doc.org/stdlib/&quot;&gt;Ruby Standard Library Docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For further reading, reference, and physical-experience addicts, the second edition of Programming Ruby (updated for Ruby 1.8, the latest) is available as a paper or &lt;span class=&quot;caps&quot;&gt;PDF&lt;/span&gt; book at &lt;a href=&quot;http://pragmaticprogrammer.com/titles/ruby/index.html&quot;&gt;the Programming Ruby website&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Rails&lt;/h3&gt;
&lt;div class=&quot;sidebar&quot;&gt;
&lt;h4&gt;Installing Rails&lt;/h4&gt;
&lt;p&gt;Installing Rails on your computer is surprisingly easy. There are two software projects, one for Windows and one for Mac, that have produced one-click installers for Rails. The Windows package is called &lt;a href=&quot;http://instantrails.rubyforge.org&quot;&gt;Instant Rails&lt;/a&gt;, and the Mac package is called &lt;a href=&quot;http://locomotive.raaum.org/&quot;&gt;Locomotive&lt;/a&gt;. If you&amp;#8217;re running Linux, just install your distro&amp;#8217;s &amp;#8220;Rails&amp;#8221; package.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#8220;Finally,&amp;#8221; you&amp;#8217;re thinking, &amp;#8220;the actual thing I wanted to learn about in the first place.&amp;#8221; And here it is. Ruby on Rails has been praised in many ways, so I won&amp;#8217;t repeat any of that here, but you can find out a lot about it at the &lt;a href=&quot;http://rubyonrails.org&quot;&gt;Ruby on Rails homepage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once you&amp;#8217;ve got Rails installed on your computer, and you&amp;#8217;ve read the documentation that came with the installer package, start with a very basic introductory tutorial, like &lt;a href=&quot;http://instantrails.rubyforge.org/tutorial/index.html&quot;&gt;Rolling with Instant Rails&lt;/a&gt;. Next, try a tutorial with a bit more content, like &lt;a href=&quot;http://rails.homelinux.org/&quot;&gt;Four Days on Rails&lt;/a&gt; or the &amp;#8220;Creating a Depot&amp;#8221; chapters of the excellent &lt;em&gt;Agile Development with Ruby on Rails&lt;/em&gt; book.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://pragmaticprogrammer.com/titles/rails/index.html&quot;&gt;&lt;em&gt;Agile Development with Rails&lt;/em&gt;&lt;/a&gt; is the authoritative book on the subject, and also contains an excellent reference section on the various parts of the Rails framework. It was co-written by Dave Thomas (author of &lt;em&gt;Programming Ruby&lt;/em&gt;) and David Heinemeier Hansson (creator of Ruby on Rails). It is well written, easy to read, and very thorough. Go buy it.&lt;/p&gt;
&lt;p&gt;To learn more about Rails, you can read &lt;em&gt;ADwR&lt;/em&gt; (all of it, not just the tutorial section), watch the &lt;a href=&quot;http://rubyonrails.org/screencasts&quot;&gt;Rails screencasts&lt;/a&gt; that show just how easy it is, read &lt;a href=&quot;http://pragmaticprogrammer.com/titles/fr_rr/index.html&quot;&gt;&lt;em&gt;Rails Recipies&lt;/em&gt;&lt;/a&gt;, and (you really should do this the whole time you&amp;#8217;re learning) write applications in Rails yourself.&lt;/p&gt;
&lt;h3&gt;Deployment&lt;/h3&gt;
&lt;h4&gt;This is so cool! Where do I put it?&lt;/h4&gt;
&lt;p&gt;Having made it all the way, and written you new cucumber-life-process-tracking application, you are now probably wondering how you let everyone else on the internet benefit from your hard work. For that, you&amp;#8217;ll need a webhost that supports Rails.&lt;/p&gt;
&lt;p&gt;I recommend &lt;a href=&quot;http://textdrive.com&quot;&gt;TextDrive&lt;/a&gt;, as they are not only amazingly skilled and helpful, they will even contribute a portion of each payment you make to the Ruby on Rails team if you ask them to. If you set up an account with them, there is a &lt;a href=&quot;http://manuals.textdrive.com/read/book/9&quot;&gt;manual for setting up Rails apps on TextDrive&lt;/a&gt;, and a &lt;a href=&quot;http://nubyonrails.com/pages/shovel&quot;&gt;Capistrano deployment task&lt;/a&gt; that attempts to automate sending your Rails app to your TextDrive account.&lt;/p&gt;
&lt;p&gt;If you want to explore your options, check out &lt;a href=&quot;http://www.rubyonrailswebhost.com/&quot;&gt;Ruby on Rails Web Hosting&lt;/a&gt;, where they have a writeup of several webhosts that support Ruby on Rails and &lt;a href=&quot;http://www.planetargon.com/hosting.html&quot;&gt;Planet Argon Rails hosting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Lastly, of course, you could be one of those people who simply has to host their application on their own server. In that case, you probably want to check out &lt;a href=&quot;http://www.flpr.org/articles/2005/08/20/intro-to-flpr&quot;&gt;&lt;span class=&quot;caps&quot;&gt;FLPR&lt;/span&gt;&lt;/a&gt; (FreeBSD, Lighttpd, PostgreSQL, Rails), or &lt;a href=&quot;http://brainspl.at/pages/perfect_vps&quot;&gt;The Perfect Rails Debian server&lt;/a&gt; (Debian, Lighttpd, Mysql, Rails), depending on your distribution.&lt;/p&gt;
&lt;p&gt;At this point, you should be able to write Rails applications, upload them to your webhost, and show everyone you know what cool and amazing things you&amp;#8217;ve done. If you have any questions, corrections, suggestions, or other feedback, please leave a comment. Thanks, and good luck!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Trac FCGI URL Frustration</title>
   <link href="http://andre.arko.net/2006/03/18/trac-fcgi-url-frustration/"/>
   <updated>2006-03-18T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/03/18/trac-fcgi-url-frustration</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve never tried this before, and I kind of doubt anyone who actually knows the answer will see this, but I figure it&amp;#8217;s worth a shot:&lt;/p&gt;
&lt;p&gt;Dear Lazyweb,&lt;/p&gt;
&lt;p&gt;Trac (running as an &lt;span class=&quot;caps&quot;&gt;FCGI&lt;/span&gt; process under Lighttpd on my TextDrive hosting) insists on putting a prefix url (default /trac/) in front of the actual &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; of my trac project. Nothing would give me more pleasure than to be able to access a trac installation at &amp;#8220;trac.arko.net&amp;#8221;, but I am forced to use &amp;#8220;trac.arko.net/trac/&amp;#8221;. The links to stylesheet, images, wiki pages, everything, all stay &lt;code&gt;/trac/link&lt;/code&gt;, even though &lt;code&gt;/trac&lt;/code&gt; isn&amp;#8217;t in the configuration anymore. Why, for the love of all that is good and holy, do all the links break if I take out /trac from the &lt;span class=&quot;caps&quot;&gt;FCGI&lt;/span&gt; configuration?&lt;/p&gt;
&lt;p&gt;Your sincere admirer,&lt;br /&gt;
Andre&lt;/p&gt;
&lt;p&gt;P.S. Here is the lightty configuration, just in case it might help:&lt;br /&gt;
Liquid error: No such file or directory &amp;#8211; posix_spawnp&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I am not alone! I am just bad at searching this new-fangled intar-web thingy. Behold, &lt;a href=&quot;http://projects.edgewall.com/trac/ticket/2418&quot;&gt;the Trac ticket for my very problem&lt;/a&gt;. The downside is that no one&amp;#8217;s touched it for months. Grr.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Design</title>
   <link href="http://andre.arko.net/2006/03/15/design/"/>
   <updated>2006-03-15T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/03/15/design</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; This post is contentless. Just so you know.&lt;/p&gt;
&lt;p&gt;So I have a new design (pretty, eh? I like it). I really wanted &lt;a href=&quot;http://jamis.jamisbuck.org/&quot;&gt;Jamis&amp;#8217; design&lt;/a&gt;, but it&amp;#8217;s not public, and ripping it off, while tempting, is just a bad idea. And writing my own would simply take forever. I do have hopes about working something up in the future, but it&amp;#8217;s really not going to happen right now.&lt;/p&gt;
&lt;p&gt;Sadly, I haven&amp;#8217;t posted for a long time because I haven&amp;#8217;t really had anything to say. I&amp;#8217;m not done enough with any projects to want to post them, and most of my intellectual efforts has been pushed into my &lt;em&gt;Death and Resurrection&lt;/em&gt; class. While it&amp;#8217;s terribly interesting, I&amp;#8217;m not sure enough yet about what I&amp;#8217;ve learned from it to really have anything to say about it.&lt;/p&gt;
&lt;p&gt;On the subject of my broken bones, they are recovering admirably; soon they may even return to the positions that they were in before the accident. While they are not quite there yet, I&amp;#8217;m hopeful.&lt;/p&gt;
&lt;p&gt;While I&amp;#8217;m talking about books I have to read for school, I will make a terrible example of a book I sincerely believe should:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;be burned wherever it may be&lt;/li&gt;
	&lt;li&gt;might have been okay if it were written as a work of non-fiction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me give you an example. The book begins thus:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;This board meeting is adjourned,&amp;#8221; announces Daniel Pullman, the domineering chairman and &lt;span class=&quot;caps&quot;&gt;CEO&lt;/span&gt; or Genemodem. The elegant conference room hums with conversation as the directors start to depart. The last quarter was the best in the history of the company.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The entire book is written in the present tense, and alternates seemingly at random between first-person and third-person perspectives. Better yet, the author&amp;#8217;s amazing grasp of the art of phrase-prepending results in sentences like these:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It was no small effort, and it did not come cheap, but at last, a week ago, they had received the four-hundred-page report.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Try reading that out loud three times fast.&lt;/p&gt;
&lt;p&gt;So, to tie this mini-rant back to the subject of the post, deliberate and conscious design would really have benefited this book I have to read.&lt;/p&gt;
&lt;p&gt;I told you this post didn&amp;#8217;t have any content. Should&amp;#8217;ve listened.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>A Most Vexing Conundrum</title>
   <link href="http://andre.arko.net/2006/02/09/a-most-vexing-conundrum/"/>
   <updated>2006-02-09T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/02/09/a-most-vexing-conundrum</id>
   <content type="html">&lt;p&gt;So Microsoft has released a preview soundbite of the new, super-cool text-to-speech voice that they will be including in Windows Vista, named ==&lt;a href=&quot;http://spaces.msn.com/bhandler/blog/cns!70F64BC910C9F7F3!727.entry?_c11_blogpart_blogpart=blogview&amp;_c=blogpart#permalink&quot;&gt;Anna&lt;/a&gt;.== This is great, but there is a problem. I happen to think that the voice that comes with Mac OS X, named Vicki, sounds better.&lt;/p&gt;
&lt;p&gt;You may think that you have heard Vicki before, when she was named Victoria, and has been around since approximately Mac OS 8 and MacInTalk Pro. However, Vicki was created entirely anew for Mac OS X 10.3, so while she sounds a lot like Victoria, she has higher quality samples.&lt;/p&gt;
&lt;p&gt;There is only one way to settle this: with a poll.&lt;/p&gt;
&lt;p&gt;Listen to these two samples, one of Anna, and one of Vicki, reading the same text:&lt;br /&gt;
&lt;a href=&quot;http://arko.net/files/sounds/anna.wav&quot;&gt;Anna sample&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://arko.net/files/sounds/vicki.wav&quot;&gt;Vicki sample&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sadly, I had to make Vicki read the same text as Anna&amp;#8217;s sample, since Anna is not yet available to the general public.&lt;/p&gt;
&lt;p&gt;The criticism I level against Anna is that she sounds too corporate, too stilted, and too electronic. The criticism Ben aims at Vicki is that she (like all MacInTalk voices) sounds like a synthetic pipe organ trying to emulate speech.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Spending lots of money</title>
   <link href="http://andre.arko.net/2006/02/08/spending-lots-of-money/"/>
   <updated>2006-02-08T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/02/08/spending-lots-of-money</id>
   <content type="html">&lt;p&gt;&amp;#8230;can sometimes be &lt;a href=&quot;http://pragmaticprogrammer.com/titles/fr_rr/&quot;&gt;educational&lt;/a&gt;, &lt;a href=&quot;http://www.retrousb.com/index.html&quot;&gt;entertaining&lt;/a&gt;, and &lt;a href=&quot;http://www.fcpa.com/products/scanners/scansnap-5110Eoxm/features.html&quot;&gt;really&lt;/a&gt;, &lt;a href=&quot;http://textdrive.com/mixedgrill&quot;&gt;really&lt;/a&gt;, &lt;a href=&quot;http://railsconf.com&quot;&gt;fun&lt;/a&gt;. Yay.&lt;/p&gt;
&lt;p&gt;Okay, so I really just wanted an excuse to show of my cool new stuff. It&amp;#8217;s &lt;em&gt;very&lt;/em&gt; cool new stuff, though.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Small Miracles</title>
   <link href="http://andre.arko.net/2006/01/23/small-miracles/"/>
   <updated>2006-01-23T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/01/23/small-miracles</id>
   <content type="html">&lt;p&gt;And I mean small. But the &amp;#8220;Get Well&amp;#8221; balloon that I was given on the day I returned from the hospital is still here, and still floating. It&amp;#8217;s neat.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>iTunes Multiple Speakers</title>
   <link href="http://andre.arko.net/2006/01/18/itunes-multiple-speakers/"/>
   <updated>2006-01-18T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/01/18/itunes-multiple-speakers</id>
   <content type="html">&lt;p&gt;While I find the iTunes mini-store completely useless, it appears that iTunes 6.0.2 does have one very cool new feature: multiple speakers. If you have an AirPort Express (or two), you can play your music out of any combination of Expresses and the speakers in or connected to your computer. Knowing about the AirPort Express delay, you are probably now scoffing that the Expresses and the computer had better be in different rooms so no one can tell they are wildly out of sync, but that&amp;#8217;s the part that&amp;#8217;s actually cool. As of now, iTunes synchronizes the sound coming out of the Express(es) with the sound coming out of your speakers. Impressive.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Sick</title>
   <link href="http://andre.arko.net/2006/01/10/sick/"/>
   <updated>2006-01-10T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2006/01/10/sick</id>
   <content type="html">&lt;p&gt;Ironically, having survived the plague-ridden hospitals and the flu/holiday season, I got nicely sick today. On the other hand, I can walk, talk, make julianne fries, and do most normal things. As long as they don&amp;#8217;t involve lifting more than ten pounds, or standing up for more than ten minutes. But hey, progress is great.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Bar fight bad</title>
   <link href="http://andre.arko.net/2005/12/23/bar-fight-bad/"/>
   <updated>2005-12-23T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/12/23/bar-fight-bad</id>
   <content type="html">&lt;p&gt;I can walk almost normally, and my broken bones now mostly only feel like large bruises all the time. Hooray for progress.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Brain Dump</title>
   <link href="http://andre.arko.net/2005/12/19/brain-dump/"/>
   <updated>2005-12-19T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/12/19/brain-dump</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.apple.com/powerbook/&quot;&gt;The newest PowerBooks&lt;/a&gt; and &lt;a href=&quot;http://www.apple.com/ipod/&quot;&gt;iPods&lt;/a&gt; are very, very cool. It makes me happy to use them.&lt;/p&gt;
&lt;p&gt;I need a &lt;a href=&quot;http://project.ioni.st&quot;&gt;tumblelog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Inept people are, surprisingly enough, inept. &lt;em&gt;So&lt;/em&gt; inept, in fact, that &lt;a href=&quot;http://www.iwritecode.com/RWD/Thoughts/Inept.html&quot;&gt;they can&amp;#8217;t tell they&amp;#8217;re inept&lt;/a&gt;. This frustrates me to no end, practically on a daily basis.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://uts.cc.utexas.edu/~ifex534/general.html&quot;&gt;ReBoot&lt;/a&gt; is very geeky, fun, and it&amp;#8217;s entirely a shame that the first two seasons will never get released on &lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.rememberthemilk.com/&quot;&gt;Remember the Milk&lt;/a&gt; is entirely too useful for things like, oh, remembering the milk.&lt;/p&gt;
&lt;p&gt;Newly found good music-to-program-to: &lt;a href=&quot;http://www.imogenheap.com/&quot;&gt;Imogen Heap&lt;/a&gt; and &lt;a href=&quot;http://www.massiveattack.co.uk/&quot;&gt;Massive Attack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.boingboing.net/2005/12/18/ginormous_lime_of_th.html&quot;&gt;Ginormous limes&lt;/a&gt; are totally cool. I want one.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://rubyonrails.com&quot;&gt;Rails 1.0&lt;/a&gt; is finally out. I&amp;#8217;m already drooling over 1.1.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gaim.sourceforge.net/&quot;&gt;Gaim 2.0 beta 1 is out&lt;/a&gt;, but interestingly enough, &lt;a href=&quot;http://gaim.sourceforge.net/ChangeLog&quot;&gt;the changelog&lt;/a&gt; seems to indicate that it is following &lt;a href=&quot;http://adiumx.com&quot;&gt;Adium&amp;#8217;s&lt;/a&gt; lead, rather than the other way around.&lt;/p&gt;
&lt;p&gt;The Patriot Act &lt;a href=&quot;http://www.cnn.com/2005/POLITICS/12/16/senate.patriot.ap/index.html&quot;&gt;didn&amp;#8217;t get renewed&lt;/a&gt;. Yay.&lt;/p&gt;
&lt;p&gt;The EU has implemented &lt;a href=&quot;http://news.bbc.co.uk/2/hi/europe/4527840.stm&quot;&gt;two years of records for all phone and internet use&lt;/a&gt;. Scary.&lt;/p&gt;
&lt;p&gt;Domains in the .be (that&amp;#8217;d be Belgium. As in, &amp;#8220;Award for Most Gratuitous Use of the Word Belgium in a Screenplay&amp;#8221;) are being &lt;a href=&quot;http://www.e3internet.ru/check.php&quot;&gt;given away for free&lt;/a&gt;. I&amp;#8217;m way too late. All the cool &lt;a href=&quot;http://xona.com/domainhacks/suggest/abe.htm&quot;&gt;domain hacks&lt;/a&gt; I could think of are taken. It would have rocked to own pho.be. Just imagine&amp;#8230; techo.pho.be, and every other phobia, there for the taking. Or scri.be. Ah, well.&lt;/p&gt;
&lt;p&gt;The domain suffix .ko is &lt;a href=&quot;http://www.vuw.ac.nz/~caplabtb/dprk/DPRK_ICT.html#february01&quot;&gt;apparently being reserved for a unified Korea&lt;/a&gt;. This gives me a personal stake in the reunification of the nation of Korea&amp;#8230; how else am I going to get the domain ar.ko?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.eternalsunshine.com/&quot;&gt;Well executed movies&lt;/a&gt; are &lt;a href=&quot;http://disney.go.com/disneypictures/narnia/&quot;&gt;hard to find&lt;/a&gt;. There seems to be something about &lt;em&gt;telling&lt;/em&gt; versus &lt;em&gt;showing&lt;/em&gt; that I suspect is very big and important and might warrant a blog post of its own one day.&lt;/p&gt;
&lt;p&gt;Video game companies (and their detractors) can get scarily insane-sounding when they &lt;a href=&quot;http://www.1up.com/do/feature?pager.offset=0&amp;amp;cId=3146206&quot;&gt;sue people&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://hillhousepublishers.com/index.html&quot;&gt;Really amazingly beautiful books&lt;/a&gt; that I aspire to own one day are breathtakingly expensive.&lt;/p&gt;
&lt;p&gt;The Wikipedia &lt;a href=&quot;http://www.nature.com/news/2005/051212/full/438900a.html&quot;&gt;apparently has an error rate extremely similar to that of the Encyclopedia Brittanica&lt;/a&gt;. I&amp;#8217;m not sure if that actually &lt;em&gt;says&lt;/em&gt; anything, but it&amp;#8217;s pretty cool anyway.&lt;/p&gt;
&lt;p&gt;And that&amp;#8217;s all I&amp;#8217;ve got.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>It's walking!</title>
   <link href="http://andre.arko.net/2005/12/07/its-walking/"/>
   <updated>2005-12-07T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/12/07/its-walking</id>
   <content type="html">&lt;p&gt;I managed to hobble around for several minutes today with the aid of my walker. I am pretty optimistic that I will hit the doctor&amp;#8217;s estimate of being able to walk around by sometime next week. Hopefully that means I will be able to drive myself around soon, and make it to my finals. Nothing else much is happening, except that my health is steadily improving. Yay.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Slowly knitting bones</title>
   <link href="http://andre.arko.net/2005/11/29/slowly-knitting-bones/"/>
   <updated>2005-11-29T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/29/slowly-knitting-bones</id>
   <content type="html">&lt;p&gt;Bones take forever to knit. I can sort of limp for a couple of steps, now, and my collarbone is bothering me noticeably less than it was.&lt;/p&gt;
&lt;p&gt;Sadly, this means I really need to start getting schoolwork done again, and I feel like I do when I&amp;#8217;m sick and don&amp;#8217;t want to do work.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>You can so shop for me</title>
   <link href="http://andre.arko.net/2005/11/24/you-can-so-shop-for-me/"/>
   <updated>2005-11-24T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/24/you-can-so-shop-for-me</id>
   <content type="html">&lt;p&gt;To combat terrible and endless allegations that I am &amp;#8220;impossible to shop for, because I just buy everything I want&amp;#8221;, I have made a &lt;a href=&quot;http://www.amazon.com/gp/registry/registry.html/103-7650702-4047058?type=wishlist&amp;amp;id=1AWN47HJ9SCNW&amp;amp;reveal=unpurchased&amp;amp;filter=all&amp;amp;sort=priority&amp;amp;layout=compact&amp;amp;x=18&amp;amp;y=15&quot;&gt;wishlist on Amazon of things I want&lt;/a&gt; that I haven&amp;#8217;t bought for myself. So there.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Cool swag</title>
   <link href="http://andre.arko.net/2005/11/24/cool-swag/"/>
   <updated>2005-11-24T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/24/cool-swag</id>
   <content type="html">&lt;p&gt;Whee! &lt;a href=&quot;http://www.philisha.net&quot;&gt;Phil&lt;/a&gt; got me a cool shirt as a &amp;#8220;get better&amp;#8221; present. Check it out:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/andre/shirt.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Health update</title>
   <link href="http://andre.arko.net/2005/11/23/health-update/"/>
   <updated>2005-11-23T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/23/health-update</id>
   <content type="html">&lt;p&gt;Except for the fractures, which are a longer-term issue, my health seems mostly back to normal. I&amp;#8217;m sleeping well, eating well, and feeling pretty good considering I have broken bones everywhere.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m able to limp around with a walker without pain, although it&amp;#8217;s pretty exhausting. I&amp;#8217;m hoping to be mobile enough to start attending classes again (in a wheelchair, but hey) by next week.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>On Buying Physical Music</title>
   <link href="http://andre.arko.net/2005/11/20/on-buying-physical-music/"/>
   <updated>2005-11-20T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/20/on-buying-physical-music</id>
   <content type="html">&lt;p&gt;Dear Sony, et al.:&lt;/p&gt;
&lt;p&gt;We buy computers because &lt;em&gt;we&lt;/em&gt; want to make them do things. Not because we want &lt;a href=&quot;http://hack.fi/~muzzy/sony-drm/&quot;&gt;you, or anyone else&lt;/a&gt; to &lt;a href=&quot;http://www.sysinternals.com/blog/2005/10/sony-rootkits-and-digital-rights.html&quot;&gt;make them do other things&lt;/a&gt;, like keeping us from listening to music&amp;#8230; because we paid for it.&lt;/p&gt;
&lt;p&gt;Unlike everyone who can listen to it easily because they &lt;del&gt;stole&lt;/del&gt; downloaded it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;/files/ftsonydrm.gif&quot;&gt;Makes you feel sorry for the people who bought Celine. Well, almost.&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Mandatory health update</title>
   <link href="http://andre.arko.net/2005/11/17/mandatory-health-update/"/>
   <updated>2005-11-17T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/17/mandatory-health-update</id>
   <content type="html">&lt;p&gt;Today my health seems both improved and more stable. My collarbone is less swollen and less painful, and the swelling around my tailbone and pelvis is starting to go down. The nerve pain in my right leg is also fading away, along with the numbness, so it is feeling much closer to normal.&lt;/p&gt;
&lt;p&gt;My parents are doing a shopping run for me, so I should have food to eat. That part sounds yummy.&lt;/p&gt;
&lt;p&gt;The lawyer has started working on my case, so we&amp;#8217;ll have to see how that goes.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Ferret: Cool Ruby Library of the Day</title>
   <link href="http://andre.arko.net/2005/11/17/ferret-cool-ruby-library-of-the-day/"/>
   <updated>2005-11-17T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/17/ferret-cool-ruby-library-of-the-day</id>
   <content type="html">&lt;p&gt;A direct port of &lt;a href=&quot;http://lucene.apache.org/&quot;&gt;Lucene&lt;/a&gt; to Ruby, &lt;a href=&quot;http://ferret.davebalmain.com/trac&quot;&gt;Ferret&lt;/a&gt; makes indexed searching as easy as it ought to be. That&amp;#8217;s just very, very cool.&lt;/p&gt;
&lt;p&gt;Now if I could only figure out how to easily incorporate Ferret, &lt;a href=&quot;http://sentry.rubyforge.org/&quot;&gt;Sentry&lt;/a&gt;, and &lt;a href=&quot;http://manuals.rubyonrails.com/read/book/17&quot;&gt;SwitchTower&lt;/a&gt; into my rails apps, I&amp;#8217;d think I was getting good at this.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Update</title>
   <link href="http://andre.arko.net/2005/11/16/update/"/>
   <updated>2005-11-16T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/16/update</id>
   <content type="html">&lt;p&gt;Today, for those who care, my health is markedly improved. I am able to hobble with more ease and less pain, and my overall pain is noticeably reduced. My worries about my school have been resolving nicely &amp;#8212; my professors are being extremely understanding, and it looks like I will be able to finish my schoolwork to complete my current classes with some hard work on my part. If we can find a car to replace my old one, things will be just about as good as they can be.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Continuing recovery</title>
   <link href="http://andre.arko.net/2005/11/14/continuing-recovery/"/>
   <updated>2005-11-14T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/14/continuing-recovery</id>
   <content type="html">&lt;p&gt;Having made it home from the hospital, my condition (and my routine) seems to be stabilizing. I am able to sleep consistently (all night every night and napping each afternoon) so I&amp;#8217;m hopeful that my bones will swiftly knit. The pain is improving each day, and I am able to hobble around the house a little with the help of a hemiwalker.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;d like to see pictures of the remains of my car, they can be found &lt;a href=&quot;http://andreshealth.blogspot.com/2005/11/photos.html&quot;&gt;over on the blog my dad set up while I was in the hospital&lt;/a&gt;. If you&amp;#8217;d like to (heh, this feels awkward), you can &lt;a href=&quot;http://helpandre.com&quot;&gt;donate money to help me get a new laptop&lt;/a&gt; thanks to my roommate &lt;a href=&quot;http://www.joelmwatson.com/blog/&quot;&gt;Joel&lt;/a&gt; and my friend &lt;a href=&quot;http://philisha.net&quot;&gt;Phil&lt;/a&gt;. Said laptop would be very helpful for purposes of working both as I recover and afterward&amp;#8212;it&amp;#8217;s really hard to make a living as a programmer without a computer to program on.&lt;/p&gt;
&lt;p&gt;My main concerns at this point boil down to a few issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Catching up on missed schoolwork, and working with my professors to pass my classes this semester if I possibly can.&lt;/li&gt;
	&lt;li&gt;Wait for my bones to finish knitting without going stir-crazy (finding work to do should help this).&lt;/li&gt;
	&lt;li&gt;Replace the stuff destroyed in the crash, especially my laptop and car. The insurance company seems hell-bent on ripping me off to the greatest extent it can get away with, so prayer here would be especially appreciated right now.&lt;/li&gt;
	&lt;li&gt;Start figuring out the process that will be required for the lawsuit/whatever to (hopefully) get some money to replace the things the insurance company won&amp;#8217;t cover.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;d like to thank my parents for their help in getting me this far: my mom especially for keeping me company while I was in the hospital and doing everything she could to help me heal, and my dad for help in too many ways to list, but especially helping me while I was in the hospital.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d also like to thank every single person who helped while I was in the hospital, visited me, prayed, or otherwise showed concern for my condition over the last two weeks. It amazed me how many people cared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I just discovered today that my roommates covered my rent while I was unable to. I would like to thank my roommates profusely and from the bottom of my heart for their amazing help as I slowly recover my abilities to care for myself as my bones knit. Thanks, guys.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>It's alive!</title>
   <link href="http://andre.arko.net/2005/11/12/its-alive/"/>
   <updated>2005-11-12T00:00:00-08:00</updated>
   <id>http://andre.arko.net/2005/11/12/its-alive</id>
   <content type="html">&lt;p&gt;Well, I&amp;#8217;m alive, anyway. I don&amp;#8217;t like it when people run red lights and t-bone me at 65mph. After five days in the intensive care unit, two chest tubes, and five days in the hospital, I&amp;#8217;m down to a broken pelvis, four or five broken ribs, and a broken collarbone. I made it home tonight, but it&amp;#8217;ll still be at least a couple of weeks before I can get around easily. Hopefully, I&amp;#8217;ll keep recovering amazingly quickly, and be back to normal soon.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>I &#9829; the Web</title>
   <link href="http://andre.arko.net/2005/10/29/i-9829-the-web/"/>
   <updated>2005-10-29T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/29/i-9829-the-web</id>
   <content type="html">&lt;p&gt;The world wide web is a crazy, scary place. Even though I spend a lot of time there, it still surprises me occasionally. Today, as I was making my way through my feeds, I found an article about &lt;a href=&quot;http://www.aaronsw.com/weblog/personalitytests&quot;&gt;testing, and how bad it is&lt;/a&gt;. This article naturally had some context I didn&amp;#8217;t already know, especially about &lt;a href=&quot;http://www.aaronsw.com/weblog/001606&quot;&gt;intelligence&lt;/a&gt;, which was a fascinating discussion all by itself. Indeed, it included as a reference a &lt;a href=&quot;http://pharyngula.org/index/weblog/comments/sexist_calvinism/&quot;&gt;much more dense piece on the same subject&lt;/a&gt;, with a focus on mathematics.&lt;/p&gt;
&lt;p&gt;That article naturally made references to context unfamiliar to me (keep in mind I&amp;#8217;m reading these articles as I reach the links, because finishing the first article without knowing its referents beforehand would be pointless), so I got to read &lt;a href=&quot;http://www.scsuscholars.com/2005_01_01_scsu-scholars_archive.html#110626421773325830&quot;&gt;an example of how &lt;em&gt;not&lt;/em&gt; to discuss correlation between gender and intelligence&lt;/a&gt;, as well as a &lt;a href=&quot;http://bookbuzz.com/MBIO_About_Erdos.htm&quot;&gt;fascinating biography&lt;/a&gt; of a brilliant mathematician. Which article lead to a &lt;a href=&quot;http://www.amazon.com/exec/obidos/tg/detail/-/0684846357/&quot;&gt;book&lt;/a&gt; that I now, naturally, want to read. But that&amp;#8217;s for later.&lt;/p&gt;
&lt;p&gt;Up one level from Erd&amp;ouml;s, there was still background on what Stephen Pinker thought about gender (as he is frequently cited by gender-innatists, if you&amp;#8217;re actually following the content of these links). That link was dead, though, so I googled around (encountering &lt;a href=&quot;/files/google_error.png&quot;&gt;my first ever Google server error&lt;/a&gt;, woo) and found a &lt;a href=&quot;http://www.edge.org/3rd_culture/debate05/debate05_index.html&quot;&gt;debate on gender-innate intelligence&lt;/a&gt;. That debate under my belt as context, I was able to finish the article so I could finish the article so I could finish the article that I sat down to read in the first place.&lt;/p&gt;
&lt;p&gt;I love the web.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>We apologize for the inconvenience, and will be with you shortly...</title>
   <link href="http://andre.arko.net/2005/10/26/we-apologize-for-the-inconvenience-and-will-be-with-you-shortly/"/>
   <updated>2005-10-26T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/26/we-apologize-for-the-inconvenience-and-will-be-with-you-shortly</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://textdrive.com&quot;&gt;TextDrive&lt;/a&gt; implemented process limits on their shared servers this weekend. It turns out that editing &lt;code&gt;dispatch.fcgi&lt;/code&gt; and explicitly setting the garbage collector is a very bad idea for typo&amp;#8230; memory usage goes from 51MB to over 100MB, and then the fcgi process gets killed for exceeding the memory limit.&lt;/p&gt;
&lt;p&gt;Figuring this out took two days. Sorry about that.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Improbable Poetry</title>
   <link href="http://andre.arko.net/2005/10/18/improbable-poetry/"/>
   <updated>2005-10-18T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/18/improbable-poetry</id>
   <content type="html">&lt;p&gt;Have you always wanted to write poetry, but never have time? Well, here&amp;#8217;s a solution looking for a problem: &lt;a href=&quot;http://sip.arko.net/&quot;&gt;The Statistically Improbable Poetry Generator&lt;/a&gt;. Design (and the story of its creation) still forthcoming, but for now all your computer-mediated poetry-writing dreams can come true. Try it, you might like it.&lt;/p&gt;
&lt;p&gt;Update: After a brief fight with rails 0.14.2, it works again. Silly ActiveRecord::Base&amp;#8217;s addition of a readonly attribute.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>#rubyconf on Web2.0</title>
   <link href="http://andre.arko.net/2005/10/16/rubyconf-on-web2-0/"/>
   <updated>2005-10-16T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/16/rubyconf-on-web2-0</id>
   <content type="html">&lt;pre&gt;vinbarne1: can we skip web 2.0? i mean, really, its a bit overhyped - point/counterpoint
JamesBritt: yakoro: Good question
JamesBritt: I'm on Web 2.1
paulymer5: Let's pull a TextPattern and just jump to version 4.
yakoro: web 2.2 here
JamesBritt: Damn
court3na1: 2.1.5rc2
vinbarne1: wha? I'm still on 1.65 :(
yakoro: hopefully we'll make web 2.2 in two weeks, and by the end of november we'll be on web 2.4
bricolage: The magic version will be Web3.11 for workgroups
danp: i'm running web 3.0 in beta right now
JamesBritt: I can't wait.  I have ideas that really need Web 2.4 or better
twifkak: problem is 3.0 breaks too many APIs&lt;/pre&gt;</content>
 </entry>
 
 <entry>
   <title>rubyconf qotd</title>
   <link href="http://andre.arko.net/2005/10/15/rubyconf-qotd/"/>
   <updated>2005-10-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/15/rubyconf-qotd</id>
   <content type="html">&lt;p&gt;jauricchio: Matz is a singleton.&lt;/p&gt;
&lt;p&gt;matz: ruby2.0&amp;#8230; maybe is like perl6&lt;/p&gt;
&lt;p&gt;jimweirich: the fun part of ruby is really figuring out how to make it behave like it really shouldn&amp;#8217;t.&lt;/p&gt;
&lt;p&gt;anonymous methods, maybe, at the keynote:&lt;br /&gt;&lt;code&gt;&amp;lt;pre&amp;gt;_why = def (x=5)
  ...
end&amp;lt;/pre&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;DHH&lt;/span&gt;: poking in the eyes of java developers is a fun bandwagon to jump on!&lt;/p&gt;
&lt;p&gt;obiejuan: getting the go ahead to deploy from your project manager: good&lt;br /&gt;
typing rake deploy while he&amp;#8217;s telling you: great&lt;br /&gt;
the look on his face when you say &amp;#8220;done&amp;#8221; : priceless&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>hero worship</title>
   <link href="http://andre.arko.net/2005/10/15/hero-worship/"/>
   <updated>2005-10-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/15/hero-worship</id>
   <content type="html">&lt;p&gt;Ahhhh. Sitting around and watching the rails team finish up the last outstanding issues on 1.0 == very super cool. I can probably die happy now.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Grumble grumble</title>
   <link href="http://andre.arko.net/2005/10/09/grumble-grumble/"/>
   <updated>2005-10-09T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/09/grumble-grumble</id>
   <content type="html">&lt;p&gt;Well, that was bloody irritating.&lt;/p&gt;
&lt;p&gt;So, typo had some really huge schema changes within the last few days, going with single table inheritance for all articles, comments, trackbacks and the like. This apparently cleaned up the code something fierce, which I am very interested in taking a gander at. (ActiveRecord just doesn&amp;#8217;t seem to lend itself to &lt;span class=&quot;caps&quot;&gt;STI&lt;/span&gt; at all, so I&amp;#8217;m really also wondering how it did so much happy stuff to the codebase. Ah well, I&amp;#8217;m sure I&amp;#8217;ll learn something&amp;#8212;typo&amp;#8217;s got really slick programmers.) However, those happy (massive) schema changes require a ton of reworking for existing typo installation databases.&lt;/p&gt;
&lt;p&gt;So, I, like a really stupid person, just went and &lt;code&gt;svn up&lt;/code&gt;ed, and then went to &lt;code&gt;rake migrate&lt;/code&gt;. Sadly, all is not well in migration-land, and the migration to version 18  tried to do something clever that required a model (&lt;code&gt;Content&lt;/code&gt;, the new one) that didn&amp;#8217;t exist yet&amp;#8230; &lt;code&gt;Content&lt;/code&gt; gets generated by the version 20 migration. Crap. That was the point at which I went and looked at the message with the update, and saw the &amp;#8220;&lt;span class=&quot;caps&quot;&gt;BACK&lt;/span&gt; UP &lt;span class=&quot;caps&quot;&gt;YOUR&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;DATABASE&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;BEFORE&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;MIGRATING&lt;/span&gt;&amp;#8221; note. So I tried to migrate back down to version 17 (which worked, thankfully), backed up my database, and then tried to figure out what to do next.&lt;/p&gt;
&lt;p&gt;After an hour and a half of randomly poking at the migrations and at the database (and having to restore from my backup about six times), I got the bright idea to update just a couple of svn versions at a time, and &lt;code&gt;rake migrate&lt;/code&gt; each time. Hopefully, the migration wouldn&amp;#8217;t bork if the model file that expected the not-quite-there-yet table didn&amp;#8217;t exist yet. Amazingly enough, after a restore from backup, it worked. About 15 minutes of &lt;code&gt;svn up&lt;/code&gt; and &lt;code&gt;rake migrate&lt;/code&gt; and my database was, miraculously enough, migrated. Happiness. Then I only had to spend another ten minutes wondering why it wouldn&amp;#8217;t load up properly&amp;#8230; since I hadn&amp;#8217;t restarted the server yet, to update the running code to the new version I had just updated to.&lt;/p&gt;
&lt;p&gt;The moral of the story: next time I go to upgrade software, I should be not sick.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Backpack, here I come...</title>
   <link href="http://andre.arko.net/2005/10/03/backpack-here-i-come/"/>
   <updated>2005-10-03T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/10/03/backpack-here-i-come</id>
   <content type="html">&lt;p&gt;There&amp;#8217;s a &lt;a href=&quot;http://www.chipt.com/&quot;&gt;Backpack Widget&lt;/a&gt;. This is exciting because it means I don&amp;#8217;t have to manage all those little reminders and whatnot via web pages&amp;#8230;&lt;/p&gt;
&lt;p&gt;Ironically, as I find webapps more and more useful, and as ajax makes them more like real programs, I really wish more and more that I have an interface to them that isn&amp;#8217;t a web browser. At least I have one for Backpack.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Serenity and Mirrormask</title>
   <link href="http://andre.arko.net/2005/09/30/serenity-and-mirrormask/"/>
   <updated>2005-09-30T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/30/serenity-and-mirrormask</id>
   <content type="html">&lt;p&gt;Whee! Going to see &lt;a href=&quot;http://sonypictures.com/movies/mirrormask&quot;&gt;MirrorMask&lt;/a&gt; with &lt;a href=&quot;http://philisha.net&quot;&gt;Phil&lt;/a&gt; and &lt;a href=&quot;http://www.joelmwatson.com/blog&quot;&gt;Joel&lt;/a&gt; and Rachel, and then watch all of &lt;a href=&quot;http://www.fireflyfans.net&quot;&gt;Firefly&lt;/a&gt; and then go see &lt;a href=&quot;http://www.serenitymovie.com&quot;&gt;Serenity&lt;/a&gt;. And have &lt;a href=&quot;http://katamari.namco.com&quot;&gt;We Love Katamari&lt;/a&gt; for playing during the times I&amp;#8217;m not watching cool stuff. Plan for a sweet weekend.&lt;/p&gt;
&lt;p&gt;Go see both movies this weekend, if you can, so they&amp;#8217;ll get wider theatrical releases.&lt;/p&gt;
&lt;p&gt;Since the world is somehow cooperating with my fantasies this weekend, here is a &lt;a href=&quot;http://www.time.com/time/arts/article/0,8599,1109313-1,00.html&quot;&gt;simultaneous interview with Time magazine&lt;/a&gt; of both &lt;a href=&quot;http://www.neilgaiman.com&quot;&gt;Neil&lt;/a&gt; and &lt;a href=&quot;http://www.whedonesque.com&quot;&gt;Joss&lt;/a&gt; at the same time, talking about their movies and what it&amp;#8217;s like to not be marginalized and cool for being goofy nerds anymore.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Del.icio.us</title>
   <link href="http://andre.arko.net/2005/09/21/del-icio-us/"/>
   <updated>2005-09-21T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/21/del-icio-us</id>
   <content type="html">&lt;p&gt;I can&amp;#8217;t believe I didn&amp;#8217;t do this a very, very, very long time ago. &lt;a href=&quot;http://del.icio.us&quot;&gt;Delicious&lt;/a&gt; is what I&amp;#8217;ve been trying to do with my bookmarks for the last eight years. How do you categorize a bookmark that&amp;#8217;s about web programming, and OS X, and ruby? You add tags for &lt;em&gt;all of them&lt;/em&gt;. I&amp;#8217;m way behind the curve, here, but it feels really really good to finally have made it to a modern way to handle bookmarks.&lt;/p&gt;
&lt;p&gt;Delicious also really drives home the power of &lt;a href=&quot;http://en.wikipedia.org/wiki/Folksonomy&quot;&gt;folksonomies&lt;/a&gt; and tagging in a way that I just never understood before. Mentally understanding how tagging works and thinking it is cool is a long way from suddenly being able to find that bookmark that you only vaguely remember had something to do with &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;Hooray.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Not Very Punny</title>
   <link href="http://andre.arko.net/2005/09/20/not-very-punny/"/>
   <updated>2005-09-20T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/20/not-very-punny</id>
   <content type="html">&lt;p&gt;Today is just one of those days that needs a terrible pun. So here&amp;#8217;s my favourite.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One time, there was a legendary explorer who heard about an everliving, landlocked dolphin in the heart of Africa. In fact, it lived so long the natives called it &amp;#8216;The Whale that would not die&amp;#8217;. The explorer set off to Africa, and he hired a guide that was familiar with the dolphin. As he was setting out on his journey, his guide told him that to find the porpoise, he would have to have a sacred myna bird on his shoulder. The explorer bought a bird. They traveled about 10 miles from the lake, when they found a dead lion lying in the trail. The guide said they couldn&amp;#8217;t go on because the lion belonged to the government. The explorer said &amp;#8220;Hogwash&amp;#8221; and stepped over the beast. Police immediately stepped out from behind some trees and arrested him for &amp;#8216;Transporting a myna across state lions for immortal porpoises.&amp;#8217;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you&amp;#8217;ve had an even worse day than me, here are some &lt;a href=&quot;http://www.macscouter.com/Stories/BadPuns-1.html&quot;&gt;more&lt;/a&gt; &lt;a href=&quot;http://www.yuksrus.com/PUNS.HTML&quot;&gt;puns&lt;/a&gt;, just in case.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails Redirect Delay</title>
   <link href="http://andre.arko.net/2005/09/19/rails-redirect-delay/"/>
   <updated>2005-09-19T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/19/rails-redirect-delay</id>
   <content type="html">&lt;p&gt;The &lt;a href=&quot;http://www.stupidsimple.org/articles/2005/09/14/running-rails-on-lighttpd-behind-apache2&quot;&gt;30 second delay&lt;/a&gt; when you try to proxy lighty through apache and your rails app sends a redirect is really annoying.&lt;/p&gt;
&lt;p&gt;And there&amp;#8217;s no way to fix it short of modifying ActionController. Suck.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>A New Angle on Trig</title>
   <link href="http://andre.arko.net/2005/09/17/a-new-angle-on-trig/"/>
   <updated>2005-09-17T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/17/a-new-angle-on-trig</id>
   <content type="html">&lt;p&gt;Ha. Seriously, though, it&amp;#8217;s Trig without Sin, Cos, Tan, or angles, at all. Amazing, and really interesting.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://web.maths.unsw.edu.au.nyud.net:8090/~norman/book.htm&quot;&gt;Press release on book&lt;/a&gt; and &lt;a href=&quot;http://web.maths.unsw.edu.au.nyud.net:8090/~norman/papers/Chapter1.pdf&quot;&gt;first chapter with introduction&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s terrible to realize that all those stupid formulas you jammed into your head were totally unneeded, but it gives me great hope that people in the future won&amp;#8217;t think of math as terrible formula memorization like I do&amp;#8230;  yay!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Understand</title>
   <link href="http://andre.arko.net/2005/09/15/understand/"/>
   <updated>2005-09-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/15/understand</id>
   <content type="html">&lt;p&gt;Understand what?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.infinityplus.co.uk/stories/under.htm&quot;&gt;Everything&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Science. No, really...</title>
   <link href="http://andre.arko.net/2005/09/15/science-no-really/"/>
   <updated>2005-09-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/15/science-no-really</id>
   <content type="html">&lt;p&gt;Science today is screwed up. Not by the scientists, who are (mostly) honest and self-policing. Not even really by the masses, trying to understand what new discoveries are, and what they mean.&lt;/p&gt;
&lt;p&gt;Coming from one side is the government (the traditional source of funding for research that seems totally useless, until it turns into something we can&amp;#8217;t live without&amp;#8230; like, say, the internet&amp;#8230;) who is much more interested in spending money on &lt;a href=&quot;http://news.yahoo.com/news?tmpl=story&amp;amp;u=/nm/20050910/pl_nm/contracts_dc_1&quot;&gt;non-scientific things&lt;/a&gt;. Even after the scientists &lt;a href=&quot;http://www.dailykos.com/storyonly/2005/9/6/3840/39445&quot;&gt;tried to warn them&lt;/a&gt; about how to not &amp;#8220;need to&amp;#8221; spend that much money.&lt;/p&gt;
&lt;p&gt;From the other side, the media pretty much &lt;a href=&quot;http://www.guardian.co.uk/life/badscience/story/0,12980,1564369,00.html&quot;&gt;systematically destroys anything scientists try to say&lt;/a&gt; before it can reach the ears of the public.&lt;/p&gt;
&lt;p&gt;And that&amp;#8217;s not even counting the governmentally or commercially funded &amp;#8220;scientists&amp;#8221; who dispute, in the media, anything that their sponors think is a bad idea.&lt;/p&gt;
&lt;p&gt;Bleh.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Joke of the Moment</title>
   <link href="http://andre.arko.net/2005/09/15/joke-of-the-moment/"/>
   <updated>2005-09-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/15/joke-of-the-moment</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; What&amp;#8217;s George Bush&amp;#8217;s position on Roe v. Wade?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; He really doesn&amp;#8217;t care how people get out of New Orleans.&lt;/p&gt;
&lt;p&gt;And today with a bonus joke!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.5ives.com/archives/003097.php&quot;&gt;Five things Iâ€™d ask every Supreme Court nominee if I sat on the Senate Judiciary Committee&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;If you knew to an absolute moral certainty that you could capture and consume a live infant without being caught, how many do you suppose you could eat in a weekend?&lt;/li&gt;
	&lt;li&gt;Have you ever been spanked erotically by someone who was not your current legal spouse? Just yes or no, please.&lt;/li&gt;
	&lt;li&gt;Nominee, do you regard these slacks as accentuating my basket in an un-senatorial fashion?&lt;/li&gt;
	&lt;li&gt;Describe in single words, only the good things that come into your mind aboutâ€¦your mother.&lt;/li&gt;
	&lt;li&gt;Kindly rise, and sing the 1979 hit, The PiÃ±a Colada Song, also known as Escape.&lt;/li&gt;
&lt;/ol&gt;</content>
 </entry>
 
 <entry>
   <title>You really have to wonder...</title>
   <link href="http://andre.arko.net/2005/09/10/you-really-have-to-wonder/"/>
   <updated>2005-09-10T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/10/you-really-have-to-wonder</id>
   <content type="html">&lt;blockquote&gt;
&lt;p&gt;Fully &amp;#8220;&lt;span class=&quot;caps&quot;&gt;READY&lt;/span&gt;&amp;#8221; to Begin Increasing Public Service Announcement&lt;br /&gt;
Emails to 20 Times the Amount of Internet Users by 25 Times the &lt;br /&gt;
Current Sending Rate &amp;amp; Speed When a Certain Activity Transpires.  &lt;br /&gt;
[&lt;span class=&quot;caps&quot;&gt;CURRENTLY&lt;/span&gt; IN &lt;span class=&quot;caps&quot;&gt;WAITING&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;FOR&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;THIS&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;ACTIVITY&lt;/span&gt; TO &lt;span class=&quot;caps&quot;&gt;TRANSPIRE&lt;/span&gt;]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;..what is going on in people&amp;#8217;s heads when they write things like this. And then send it to a million email addresses.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>I, for one, welcome our new burnt aqua overlords...</title>
   <link href="http://andre.arko.net/2005/09/09/i-for-one-welcome-our-new-burnt-aqua-overlords/"/>
   <updated>2005-09-09T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/09/i-for-one-welcome-our-new-burnt-aqua-overlords</id>
   <content type="html">&lt;p&gt;iTunes 5 has a new look. John Gruber gives us &lt;a href=&quot;http://daringfireball.net/2005/09/anthropomorphized&quot;&gt;the inside scoop on what really happened&lt;/a&gt;. This really is the kind of stuff of which up can not be made, folks.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Wait, it gets better...</title>
   <link href="http://andre.arko.net/2005/09/07/wait-it-gets-better/"/>
   <updated>2005-09-07T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/07/wait-it-gets-better</id>
   <content type="html">&lt;p&gt;So now that &lt;span class=&quot;caps&quot;&gt;FEMA&lt;/span&gt; has finally arrived in the Katrina-ravaged areas, they&amp;#8217;re taking decisive action:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No pictures by journalists of anything bad, like &lt;a href=&quot;http://today.reuters.com/investing/financeArticle.aspx?type=bondsNews&amp;amp;storyID=2005-09-07T005629Z_01_N06101601_RTRIDST_0_KATRINA-PHOTOGRAPHS.XML&quot;&gt;dead people&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.operationflashlight.com/&quot;&gt;No press &lt;em&gt;at all&lt;/em&gt; in the most ravaged areas&lt;/a&gt;, enforced by the National Guard checkpoints&lt;/li&gt;
	&lt;li&gt;No press in the Astrodome (oops. they left &lt;a href=&quot;http://jacob.wordpress.com/2005/09/07/11/&quot;&gt;a reporter inside&lt;/a&gt;, but they have tried to throw him out)&lt;/li&gt;
	&lt;li&gt;Actively &lt;a href=&quot;http://crawfordpeace.nfshost.com/node/1833&quot;&gt;jam emergency radio frequencies&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.boingboing.net/2005/09/07/new_orleans_waterfor.html&quot;&gt;Not let the nuclear power plant start back up&lt;/a&gt; when it&amp;#8217;s ready to go&lt;/li&gt;
	&lt;li&gt;Order the volunteer firefighters flown in from all over the country to a day of &lt;a href=&quot;http://www.sltrib.com/utah/ci_3004197&quot;&gt;training on sexual harassment&lt;/a&gt;, instead of sending them off to save people who would otherwise die&lt;/li&gt;
	&lt;li&gt;Finally send the first group of trained paramedics and firefighters out to&amp;#8230; &lt;a href=&quot;http://www.talkingpointsmemo.com/archives/week_2005_09_04.php#006430&quot;&gt;walk around with the President&lt;/a&gt; while he tours the devastated areas (&lt;a href=&quot;http://us.news3.yimg.com/us.i2.yimg.com/p/rids/20050903/i/ra2838142191.jpg?x=380&amp;y=306&amp;sig=nGxy3CvKSMMZUshWzlVoOg--&quot;&gt;Picture&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://thinkprogress.org/2005/09/04/worst-abandonments/&quot;&gt;Cut emergency communications lines&lt;/a&gt; being used to coordinate rescue and recovery efforts in the worst-hit areas&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There&amp;#8217;s more, but that&amp;#8217;s enough to be getting on with.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Good Holiday, Have a Biscuit</title>
   <link href="http://andre.arko.net/2005/09/06/good-holiday-have-a-biscuit/"/>
   <updated>2005-09-06T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/06/good-holiday-have-a-biscuit</id>
   <content type="html">&lt;p&gt;Long weekends are very good, and this one had lots of good things in it, including lots of new movies. Yay.&lt;/p&gt;
&lt;p&gt;Sadly, my Soul Calibur II game corrupted itself, and I had to start buying everything again. Ah well&amp;#8230;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Ruby-obviated Algorithmic Agony</title>
   <link href="http://andre.arko.net/2005/09/02/ruby-obviated-algorithmic-agony/"/>
   <updated>2005-09-02T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/02/ruby-obviated-algorithmic-agony</id>
   <content type="html">&lt;p&gt;Theory of Algorithms requires that we code up the basic &amp;#8220;stable matching&amp;#8221; algorithm ourselves. After much confused discussion in class today about whether to represent people as arrays, or vectors, or three-dimensional arrays (?!), I went to implement it in ruby. In a happy recurrence of what seems always happen, it was easier and faster than I thought it would be.&lt;/p&gt;
&lt;p&gt;The algorithm worked out to this:&lt;br /&gt;
Liquid error: No such file or directory &amp;#8211; posix_spawnp&lt;/p&gt;
&lt;p&gt;The classes employed to make the algorithm so happily brief:&lt;br /&gt;
Liquid error: No such file or directory &amp;#8211; posix_spawnp&lt;/p&gt;
&lt;p&gt;Whee. Yet another 10 hours of agonizing C++ debugging avoided.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Some things are scarier than the TSA</title>
   <link href="http://andre.arko.net/2005/09/01/some-things-are-scarier-than-the-tsa/"/>
   <updated>2005-09-01T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/09/01/some-things-are-scarier-than-the-tsa</id>
   <content type="html">&lt;p&gt;From &lt;a href=&quot;http://www.law.com/jsp/article.jsp?id=1125318960389&quot;&gt;law.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When &lt;span class=&quot;caps&quot;&gt;FBI&lt;/span&gt; supervisors in Miami met with new interim U.S. Attorney Alex Acosta last month, they wondered what the top enforcement priority for Acosta and Attorney General Alberto Gonzales would be.&lt;/p&gt;
&lt;p&gt;Would it be terrorism? Organized crime? Narcotics trafficking? Immigration? Or maybe public corruption?&lt;/p&gt;
&lt;p&gt;The agents were stunned to learn that a top prosecutorial priority of Acosta and the Department of Justice was none of the above. Instead, Acosta told them, it&amp;#8217;s obscenity. Not pornography involving children, but pornographic material featuring consenting adults.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It gets better, later, when Acosta reveals that &lt;span class=&quot;caps&quot;&gt;FBI&lt;/span&gt; agents from the already-overloaded Crimes Against Children unit will be taken off of cases of child endangerment to work on cases against adult pornographers, by the Attorney General&amp;#8217;s mandate.&lt;/p&gt;
&lt;p&gt;That is &lt;em&gt;not&lt;/em&gt; cool.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>I know it's August</title>
   <link href="http://andre.arko.net/2005/08/31/i-know-its-august/"/>
   <updated>2005-08-31T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/31/i-know-its-august</id>
   <content type="html">&lt;p&gt;So this isn&amp;#8217;t exactly current or anything, but it still makes me laugh a little each time I see it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/andre/elect-slave-compare.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The TSA is Scary</title>
   <link href="http://andre.arko.net/2005/08/30/the-tsa-is-scary/"/>
   <updated>2005-08-30T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/30/the-tsa-is-scary</id>
   <content type="html">&lt;p&gt;From &lt;a href=&quot;http://www.schneier.com/&quot;&gt;Bruce Schneier&lt;/a&gt; via &lt;a href=&quot;http://www.counterpane.com/crypto-gram.html&quot;&gt;CryptoGram&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Last month the &lt;span class=&quot;caps&quot;&gt;GAO&lt;/span&gt; issued a new report on Secure Flight. It&amp;#8217;s couched in friendly language, but it&amp;#8217;s not good.  Here&amp;#8217;s an excerpt:&lt;/p&gt;
&lt;p&gt;&amp;#8220;During the course of our ongoing review of the Secure Flight program, we found that &lt;span class=&quot;caps&quot;&gt;TSA&lt;/span&gt; did not fully disclose to the public its use of personal information in its fall 2004 privacy notices as required by the Privacy Act. In particular, the public was not made fully aware of, nor had the opportunity to comment on, TSA&amp;#8217;s use of personal information drawn from commercial sources to test aspects of the Secure Flight program. In September 2004 and November 2004, &lt;span class=&quot;caps&quot;&gt;TSA&lt;/span&gt; issued privacy notices in the Federal Register that included descriptions of how such information would be used. However, these notices did not fully inform the public before testing began about the procedures that &lt;span class=&quot;caps&quot;&gt;TSA&lt;/span&gt; and its contractors would follow for collecting, using, and storing commercial data. In addition, the scope of the data used during commercial data testing was not fully disclosed in the notices. Specifically, a &lt;span class=&quot;caps&quot;&gt;TSA&lt;/span&gt; contractor, acting on behalf of the agency, collected more than 100 million commercial data records containing personal information such as name, date of birth, and telephone number without informing the public. As a result of TSA&amp;#8217;s actions, the public did not receive the full protections of the Privacy Act.&amp;#8221;&lt;/p&gt;
&lt;p&gt;Got that? The &lt;span class=&quot;caps&quot;&gt;TSA&lt;/span&gt; violated federal law when it secretly expanded Secure Flight&amp;#8217;s use of commercial data about passengers. It also lied to Congress and the public about it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Get these people away from me.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Server Software, Evolved</title>
   <link href="http://andre.arko.net/2005/08/30/server-software-evolved/"/>
   <updated>2005-08-30T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/30/server-software-evolved</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;www.postgresql.com&quot;&gt;Postgres&lt;/a&gt;. &lt;a href=&quot;www.lighttpd.net&quot;&gt;Lighttpd&lt;/a&gt;. &lt;a href=&quot;www.rubyonrails.com&quot;&gt;Rails&lt;/a&gt;. &lt;a href=&quot;subversion.tigris.org&quot;&gt;Subversion&lt;/a&gt;. Watch your life become interesting and happy as you embrace the coolest toys around. ;)&lt;/p&gt;
&lt;p&gt;And now, with even less continuous effort, thanks to &lt;a href=&quot;http://manuals.rubyonrails.com/read/book/17&quot;&gt;SwitchTower&lt;/a&gt;. Yay.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Favourite quote of the day</title>
   <link href="http://andre.arko.net/2005/08/30/favourite-quote-of-the-day/"/>
   <updated>2005-08-30T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/30/favourite-quote-of-the-day</id>
   <content type="html">&lt;p&gt;&amp;#8220;Why do we trust our senses?&amp;#8221;&lt;/p&gt;
&lt;p&gt;&amp;#8220;Because God made us. And he didn&amp;#8217;t make us &lt;em&gt;stupid&lt;/em&gt;.&amp;#8221;&lt;/p&gt;
&lt;p&gt;People who put all their effort into convincing people that they &amp;#8220;really are religious even though they say they aren&amp;#8217;t&amp;#8221; bother me. Not because I think that people are particularly capable of being completely a-religious (at least, in the sense those people mean it), but because they&amp;#8217;re about 5 (or 10?) years behind the times.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>WWII as an RTS chat</title>
   <link href="http://andre.arko.net/2005/08/29/wwii-as-an-rts-chat/"/>
   <updated>2005-08-29T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/29/wwii-as-an-rts-chat</id>
   <content type="html">&lt;p&gt;Hey, it&amp;#8217;s not every day that you find &lt;a href=&quot;http://www.strategypage.com/humor/articles/military_jokes_20057151.asp&quot;&gt;&lt;span class=&quot;caps&quot;&gt;WWII&lt;/span&gt; enacted as a chat transcript from an &lt;span class=&quot;caps&quot;&gt;RTS&lt;/span&gt; game&lt;/a&gt;. And when it&amp;#8217;s funny, you should read it.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>In Which The Conspicuously Unmentioned Classes Make An Appearance</title>
   <link href="http://andre.arko.net/2005/08/29/in-which-the-conspicuously-unmentioned-classes-make-an-appearance/"/>
   <updated>2005-08-29T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/29/in-which-the-conspicuously-unmentioned-classes-make-an-appearance</id>
   <content type="html">&lt;p&gt;School is going to be very frustrating this semester. There are a few things I would like to be able to do by the end of the semester:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Design circuits&lt;/li&gt;
	&lt;li&gt;Speak, read and write Japanese&lt;/li&gt;
	&lt;li&gt;Excel at programming in &lt;a href=&quot;www.rubyonrails.com&quot;&gt;Ruby on Rails&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Start consistently doing test-driven development&lt;/li&gt;
	&lt;li&gt;Improve the Computer Science department&amp;#8217;s lab and server to be something less than shameful&lt;/li&gt;
	&lt;li&gt;Automate the backing up of my laptop, so it will actually happen, unlike now&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(There. Now I have a list to come back to next time I&amp;#8217;m bored and don&amp;#8217;t know what I want to do.)&lt;/p&gt;
&lt;p&gt;The really unfortunate part is that all of my classes together will only teach me the first item on that list. The rest of my classes will teach me things I already know, things I don&amp;#8217;t need to know, or things that I will probably need to know later but aren&amp;#8217;t that interesting to me now.&lt;/p&gt;
&lt;p&gt;Motivation is hard to come by when your classes have conspired to make themselves as uninteresting as possible.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Product Idea #17,463</title>
   <link href="http://andre.arko.net/2005/08/15/product-idea-17-463/"/>
   <updated>2005-08-15T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/15/product-idea-17-463</id>
   <content type="html">&lt;p&gt;Cocoa app/prefpane that can turn a &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; key into the second part of a two-factor authentication scheme for your Mac.&lt;/p&gt;
&lt;p&gt;It just needs to tie into the Authorization Service (like a thumbprint reader), and refuse authentication requests, even with the right password, for users that have set up their &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; flash drive as a key. That plus FileVault plus OpenFirmware Passwords might actually give you something resembling security on a laptop. Two-factor authentication is just so much more secure than a password by itself.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Third Time's the Charm?</title>
   <link href="http://andre.arko.net/2005/08/12/third-times-the-charm/"/>
   <updated>2005-08-12T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/12/third-times-the-charm</id>
   <content type="html">&lt;p&gt;Well, here we go. The third time arko.net rises from the ashes of my own laziness, and the third attempt at a blog. Hopefully the &lt;span class=&quot;caps&quot;&gt;AJAX&lt;/span&gt;-y sweetness of &lt;a href=&quot;typo.leetsoft.com&quot;&gt;typo&lt;/a&gt; will keep me so fascinated that I&amp;#8217;ll just have to post.&lt;/p&gt;
&lt;p&gt;Now to think of something interesting to say&amp;#8230;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rich Blogging Clients</title>
   <link href="http://andre.arko.net/2005/08/12/rich-blogging-clients/"/>
   <updated>2005-08-12T00:00:00-07:00</updated>
   <id>http://andre.arko.net/2005/08/12/rich-blogging-clients</id>
   <content type="html">&lt;p&gt;Well, that&amp;#8217;s pretty darn cool.&lt;/p&gt;
&lt;p&gt;Having spent a large amount of time with browser-based blogging interfaces, I finally understand what all those people were talking about all this time. Rich clients are just&amp;#8230; easy. I can click a button and be editing this in rich-text, which amounts to an editable live preview. I can click a button to search Amazon for something, and then even put it in:&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B000002LRR%2526tag=ws%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B000002LRR%25253FSubscriptionId=02ZH6J1W0649DTNS6002&quot; id=&quot;watermark&quot;&gt;&lt;img src=&quot;http://images.amazon.com/images/P/B000002LRR.01._SCTHUMBZZZ_.jpg&quot; alt=&quot;Watermark, by Enya&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;&amp;#8220;Watermark&amp;#8221; (Enya)&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;I can write things while I&amp;#8217;m offline and bored, and this&amp;#8217;ll save them for when I can post them. Whee.&lt;/p&gt;
&lt;p&gt;Now I just need to do something about the design&amp;#8230; blue is nice, but this is a bit much.&lt;/p&gt;</content>
 </entry>
 
 
</feed>
