<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4467999944823309015</id><updated>2012-01-24T05:42:56.607-08:00</updated><category term='ruby'/><category term='merb-auth'/><category term='thor'/><category term='javascript'/><category term='tips and tricks'/><category term='production'/><category term='deployment'/><category term='ubiquity'/><category term='github'/><category term='builtbythenet'/><category term='merb-bundler'/><category term='merb'/><category term='rubygems'/><category term='bash'/><category term='sequel'/><category term='aliases'/><category term='rspec'/><category term='git'/><category term='mac'/><category term='shortcuts'/><category term='log'/><category term='dependency'/><category term='leopoard'/><category term='merb-sequel-stack'/><category term='mozilla'/><category term='capistrano'/><category term='bus'/><category term='error'/><category term='merb-slices'/><title type='text'>class &lt;&lt; self</title><subtitle type='html'>An increasingly random set of various topics including ruby &amp;amp; rails, merb, clojure, startups...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-8427256609447671955</id><published>2010-05-24T11:44:00.000-07:00</published><updated>2010-05-24T11:46:04.700-07:00</updated><title type='text'>Moving to jackdempsey.me</title><content type='html'>A final post here at blogger: I'm moving my efforts over to &lt;a href="http://jackdempsey.me"&gt;http://jackdempsey.me&lt;/a&gt; so if you're interested, please update accordingly. Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-8427256609447671955?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/8427256609447671955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=8427256609447671955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8427256609447671955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8427256609447671955'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2010/05/moving-to-jackdempseyme.html' title='Moving to jackdempsey.me'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-4914097396958496479</id><published>2010-02-03T08:50:00.000-08:00</published><updated>2010-02-04T12:20:29.655-08:00</updated><title type='text'>notes from yet another rails 3 upgrade</title><content type='html'>These tips and tricks are valid as of today, February 3rd, 2010. Who knows what next week will bring, but for now, I thought compiling some of the techniques and hacks I've seen might help others. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rails Related&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you see a "no such file to require: rails/all" you probably don't have Rails installed correctly. I was basing my upgrade on the great &lt;a href="http://peepcode.com/system/uploads/2010/peepcode-free-004-live-coding-rails-3-upgrade.mov"&gt;screencast&lt;/a&gt; produced by Topfunky over at &lt;a href="http://peepcode.com"&gt;peepcode.com&lt;/a&gt;, and his method didn't work for me. To get things running I added this to my Gemfile:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;path "/Users/jack/git/rails", :glob =&gt; "{*/,}*.gemspec"&lt;br /&gt;&lt;del&gt;gem "rails", "3.0.pre"&lt;/del&gt;&lt;br /&gt;gem "rails", "3.0.0.beta" # Just changed today it seems&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Obviously, change the path to wherever you have rails checked out locally.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;HAML&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you see something like this: Missing template articles/index with {:formats=&gt;[:html]} in view path &lt;br /&gt;&lt;br /&gt;you probably need to install haml. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ haml --rails .&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and then you'll likely see an error about html_safe!&lt;br /&gt;&lt;br /&gt;Geoff has a nice little idea going with a config/initializers/rails3_hacks.rb file which I've also done. You can drop this in and get by the errors for now:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;projects/app master &gt; cat config/initializers/rails3_hacks.rb &lt;br /&gt;class String&lt;br /&gt;  def html_safe!() self end&lt;br /&gt;  def html_safe?() true end&lt;br /&gt;  def safe_concat(value) value+self end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;WillPaginate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Looks like Mislav and other's have been doing a lot of work in upgrading the plugin. If you see a "no paginate method for Class...." error, try cloning the source down locally, check out the rails 3 branch,build and install that gem and then update your Gemfile:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;...&lt;br /&gt;gem 'will_paginate', '3.0.pre'&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;It also seemed that WillPaginate wasn't being required into my app. For now I've created a config/initializers/requires.rb file and dropped in random requires for attention later. Putting a "require 'will_paginate'" in there fixed that up nicely. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update:&lt;/span&gt;&lt;br /&gt;Seems something's broken now. I'm getting this error:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;uninitialized constant ActiveRecord::Calculations::CALCULATIONS_OPTIONS&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Seems WP relies on that constant without checking for its existence, and it looks like its gone now. Easy enough to quick patch it if you need to get by it, but I imagine it'll be fixed in the rails3 branch soon enough. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Assorted Issues&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;HTMLEntities doesn't seem to be working, so I commented that out for now. For a great beginning list of what gems should be working, take a look here: &lt;a href="http://wiki.rubyonrails.org/rails/version3/plugins_and_gems"&gt;http://wiki.rubyonrails.org/rails/version3/plugins_and_gems&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.plataformatec.com.br/tag/devise/"&gt;Devise&lt;/a&gt;: not ready for rails 3 yet. I think they're trying to see what routing changes will settle and how that will affect their code. I'm going to see if I can pop over into that and help out a bit as I'd love to keep using it in this app. &lt;br /&gt;&lt;br /&gt;new_rails_defaults.rb: I had an error from this file and realized it's old anyway, so git rm and it's gone. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.modrails.com/"&gt;Passenger&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I also overhauled a bunch of other ruby related items on my boxes recently, and one of those items was passenger. After updating to 2.2.9, reinstalling the module, changing RailsEnv to RackEnv, things are mostly good. Remember to &lt;a href="http://rvm.beginrescueend.com/passenger/"&gt;point to the right ruby if you're using rvm&lt;/a&gt;. I also deleted the config.ru file per their &lt;a href="http://blog.phusion.nl/2010/01/08/phusion-passenger-2-2-9-released/"&gt;recommendation&lt;/a&gt;: "Smart spawning (the mechanism with which REE’s 33% memory reduction is implemented) is *not* supported for Rack apps. This means that if you want to utilize smart spawning with Rails 3, then you should remove your config.ru file."&lt;br /&gt;&lt;br /&gt;I think that's it for now. I imagine I'll update this page as I deal with new issues. Pretty excited about the new changes and starting to actually make use of them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Previous notes were from my macbook pro. Now that I'm back on the iMac I'm finding other issues. Latest is:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/Users/jack/git/rails/activesupport/lib/active_support/dependencies.rb:167:in `require': no such file to load -- rails/commands/rails (LoadError)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I'm actually not sure if that was something I did as it looks like its definitely just "require 'rails/commands'" in the latest source, but either way, if you're seeing that, just take off the second rails in that line. Correct line should be:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;require 'rails/commands'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;at the end of your script/rails.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Bundler&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Somehow just found myself facing this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;projects/app master &gt; bundle install&lt;br /&gt;/Users/jack/.rvm/gems/ree-1.8.7-2010.01/bin/bundle: line 1: require: command not found&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;A quick cat and I see something's changed, no #!...ruby line to see. Realized I had bundler 0.9.0 and 0.9.0.pre4, so I uninstalled them both, and reinstalled with:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ gem install bundler --pre&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and now have bundler-0.9.0.pre5 installed. &lt;br /&gt;&lt;br /&gt;Still things are borked, but it seems its a result of github being down: "Page did not respond in a timely fashion."&lt;br /&gt;&lt;br /&gt;Will try again in a few to make sure this gets me back on track.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ok, github's back, and just saw a tweet from Wycats. Looks like 0.9.0 final is out now, but it's recommended to wait til tomorrow and 0.9.1 + some docs. YMMV.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Application != ApplicationController&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, the app I'm converting was originally written in Merb, was partially converted to Rails 2, and is now on its way towards Rails 3. In this transition I've generally remembered what pieces to change from Merb to Rails, but I had a nice stumble earlier in forgetting to change a controller. So, if you find yourself in a place where you have a route that you know works, but is not recognized, make sure your controller is named whatever_controller.rb, and contains the code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class WhateverController &lt; ApplicationController&lt;br /&gt;...&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;not "&lt; Application". You'll an error about a route missing and could easily spend a couple hours missing the obvious.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Routes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I keep tripping myself up with this.  Lets say you have a route defined as:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  match 'foobar/:foobar' =&gt; 'foobar#foobar', :as =&gt; :foobar&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;These calls will all fail:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ree-1.8.7-2009.10 &gt; app.foobar_path&lt;br /&gt;ActionController::RoutingError: No route matches {:action=&gt;"foobar", :controller=&gt;"foobar"}&lt;br /&gt;... from (irb):3&lt;br /&gt;ree-1.8.7-2009.10 &gt; app.foobar_path('')&lt;br /&gt;ActionController::RoutingError: No route matches {:use_defaults=&gt;false, :action=&gt;"foobar", :foobar=&gt;"", :controller=&gt;"foobar"}&lt;br /&gt;... from (irb):4&lt;br /&gt;ree-1.8.7-2009.10 &gt; app.foobar_path('test')&lt;br /&gt; =&gt; "/foobar/test" &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;until that last one which passes in a value. This makes sense, as the route defines foobar as a requirement, and not passing in a value is an 'error'. It's a little less obvious that an empty string doesn't satisfy it to me, and definitely not obvious when you have this in a loop and an object just happens to be missing its value for foobar. &lt;br /&gt;&lt;br /&gt;One way around this is to make the :foobar piece optional, and handle that reality in your controller elsewhere. You could also protect against this by checking that object.foobar exists in your loop, and not linking unless it does.&lt;br /&gt;&lt;br /&gt;I've also just realized that for a certain route of mine, one that passes in domain names, sending in '&lt;a href="http://euraeka.com"&gt;euraeka.com&lt;/a&gt;' will result in an error. I'm not sure if this is the recommended solution, but its letting me progress for now:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  match 'domain/:domain' =&gt; 'search#domain', :as =&gt; :domain, :domain =&gt; /.+/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I'm using domain here instead of host as I think host might be reserved somewhere. Couldn't seem to get it to work before, so if you're having that issue, let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-4914097396958496479?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/4914097396958496479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=4914097396958496479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4914097396958496479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4914097396958496479'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2010/02/notes-from-yet-another-rails-3-upgrade.html' title='notes from yet another rails 3 upgrade'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-9112655588276600342</id><published>2009-07-18T13:10:00.000-07:00</published><updated>2009-07-18T13:19:19.142-07:00</updated><title type='text'>getting started with ruby 1.9</title><content type='html'>Yehuda Katz has a &lt;a href="http://yehudakatz.com/2009/07/17/what-do-we-need-to-get-on-ruby-1-9/"&gt;nice post&lt;/a&gt; over at his blog talking about Ruby 1.9 and what we need to do to move our community towards it. &lt;br /&gt;&lt;br /&gt;Lots of great points are brought up, but for me, the biggest issue is just not having the time to fiddle with things, setup nice little aliases, etc. Thankfully, one of the nice guys over at &lt;a href="http://thinkrelevance.com/"&gt;Relevance&lt;/a&gt; has done this for us: &lt;a href="http://github.com/spicycode/spicy-config/tree/master"&gt;spicy-config&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On a quick side note, Chad's configs also helped me get up and running with zsh, and that's been a whole other fun trip. &lt;br /&gt;&lt;br /&gt;You'll want to clone his repo and take a look in at his .zshrc file along with the ruby_installer and ruby_switcher files inside .zsh. All you have to do is source the files to get the functions defined, and run what you're interested in. I did set things up a little different given that I don't use the Leopard install of ruby...but if you're reading this, I assume you can see what you'd want to change if need be. &lt;br /&gt;&lt;br /&gt;That's about it. I can now say "use_ruby_191" and it quickly switches me over, and then 'use_ruby' to jump back to 1.8.6. &lt;br /&gt;&lt;br /&gt;Great stuff Chad, thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-9112655588276600342?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/9112655588276600342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=9112655588276600342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/9112655588276600342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/9112655588276600342'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2009/07/getting-started-with-ruby-19.html' title='getting started with ruby 1.9'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5286312268447203234</id><published>2009-07-16T18:32:00.000-07:00</published><updated>2009-07-16T19:59:43.309-07:00</updated><title type='text'>a couple quick git tips</title><content type='html'>The other day someone asked in #git how to fix something in the middle of an unsuccessful rebase. So, I thought I'd rebase some of my own code, reorder things so there must be a conflict, and then try to duplicate their question. &lt;br /&gt;&lt;br /&gt;Only problem was that there was no error, and I hadn't really paid attention to which commits I reordered. Thankfully, I got a bit of help from a gent named doener. &lt;br /&gt;&lt;br /&gt;I'm including a rather long gist showing the process. Basically, git reflog is your friend, and you should play with this at some point in a test repo like I've done here.&lt;br /&gt;&lt;br /&gt;Note: anytime you git reset --hard be very sure and confident of what you're doing. &lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/148829.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5286312268447203234?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5286312268447203234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5286312268447203234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5286312268447203234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5286312268447203234'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2009/07/couple-quick-git-tips.html' title='a couple quick git tips'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-8614908215452699395</id><published>2009-07-02T08:32:00.001-07:00</published><updated>2009-07-03T12:29:02.569-07:00</updated><title type='text'>Opening your mind with Clojure</title><content type='html'>I know, I know, clever title, right? It's true though--I've taken the last week or so to take a stab at learning &lt;a href="http://clojure.org"&gt;Clojure&lt;/a&gt;. I've played with functional languages before, but unfortunately "play" is about as far as I've gotten. This time it was different. I actually made it all the way through &lt;a href="http://www.amazon.com/gp/product/1934356336?ie=UTF8&amp;tag=cl6060se-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356336"&gt;Programming Clojure (Pragmatic Programmers)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=cl6060se-20&amp;l=as2&amp;o=1&amp;a=1934356336" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, which is saying something (I'm king of "Oh, I'll buy THAT book too!" and never finishing it...). There are a variety of reasons I'm really enjoying Clojure, but for now I'd like to offer some tips in getting set up.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Getting the Source&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Rich Hickey is the guy behind Clojure. I'd call him a mad genius, except he seems pretty nice and "happy genius" doesn't really work...Anyway, he's recently agreed to move the project to github, and you can find the two main sources you'll want in his account there. Using the wonderfully helpful &lt;a href='http://github.com/defunkt/github-gem/tree/master'&gt;github gem&lt;/a&gt; you can clone things down with&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;gh clone richhickey/clojure&lt;br /&gt;gh clone richhickey/clojure-contrib&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;At this point I'm assuming you've got java installed and working, which may be a big assumption, but I don't have the heart to tackle that mountain today. &lt;br /&gt;&lt;br /&gt;So, get into the source and start compiling:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd clojure&lt;br /&gt;ant&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If all goes well, you should have some nice jars all sparkling and ready for use. Now for contrib:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd ../clojure-contrib&lt;br /&gt;git checkout 3073f0dc0614cb8c95f2debd0b7e6a75c1736ece ***&lt;br /&gt;ant -Dclojure.jar=../clojure/clojure.jar&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;*** At this point in time, you need this revision to compile against clojure 1.0. I imagine this will change over time, but if you have any problems with compilation, a good place to check is the #clojure channel. &lt;br /&gt;&lt;br /&gt;You need to pass in that -D flag so we can use the clojure.jar in compiling clojure-contrib. Once this is done you'll want to put the jars into a common place where java can load them up. I've created an /opt/jars directory on my system, and so I'll drop them into here. &lt;br /&gt;&lt;br /&gt;Now, you'll want to make sure the CLASSPATH variable is setup correctly, and it took me a while to do this the first time, so here's a hint:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/139520.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;I think newer versions of java will just let you specify the main directory name. This is for java 1.5 which I somehow seem to still be running. &lt;br /&gt;&lt;br /&gt;Almost there!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Setting up a clj file&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;I've blatantly stolen this file from &lt;a href='http://blog.n01se.net/'&gt;Chouser&lt;/a&gt;, an ever present and extremely helpful soul found in #clojure (he's like Illari of #git for those who frequent that channel...if I ever get rich, a fat check is in their future). &lt;br /&gt;&lt;br /&gt;This is what the clj file looks like:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/139579.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;If you're on OS X you'll want to install rlwrap:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo port install rlwrap&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You'll also want an init file to help load up some useful functions like 'show' into your REPL. Create a file named "repl-init.clj" and put something like this inside:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;(set! *print-length* 103)&lt;br /&gt;(set! *print-level* 15)&lt;br /&gt;(use '[clojure.contrib.repl-utils :only [source show]])&lt;br /&gt;(use '[clojure.contrib.stacktrace :only [e]])&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This should be executed by your clj script on startup, and setup things automatically for you. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Wrap-up&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;So that's about it for now. I'm having a great time so far, and honestly the hardest parts are getting your environment setup and keeping it up to date. If you're used to java development then this should be a breeze. Having been away from it for years, it took me a while, and hopefully this will save others that same pain. &lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href='http://www.paulbarry.com/'&gt;Paul Barry&lt;/a&gt; and &lt;a href='http://www.aaronbedra.com/'&gt;Aaron Bedra&lt;/a&gt; for getting me interested in Clojure at &lt;a href='http://rubynation.org/'&gt;Ruby Nation&lt;/a&gt;, and of course Rich et al for all the time and energy put into developing this great new language. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;A few links&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://clojure.blip.tv"&gt;clojure.blip.tv&lt;/a&gt; - Rich gives some great presentations, and many of them are captured here. &lt;br /&gt;&lt;a href="http://clojure.org"&gt;clojure.org&lt;/a&gt; - Lots of great documentation here&lt;br /&gt;#clojure on irc.freenode.net - over 100 clojurists and clojuristas. Very helpful and friendly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-8614908215452699395?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/8614908215452699395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=8614908215452699395' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8614908215452699395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8614908215452699395'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2009/07/opening-your-mind-with-clojure.html' title='Opening your mind with Clojure'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-2235466450199993729</id><published>2008-12-13T18:29:00.000-08:00</published><updated>2008-12-14T00:38:43.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merb-sequel-stack'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='sequel'/><title type='text'>merb and sequel</title><content type='html'>Recently I needed to order some records by a mathematical formula, and I couldn't figure out a way to do it in DM (although it looks like the idea was well received and might make it into a future relase).  I'd heard some great things about &lt;a href="http://github.com/jeremyevans/sequel/tree/master"&gt;Sequel&lt;/a&gt;, so I decided to take a look and see what possibilities I had there. &lt;br /&gt;&lt;br /&gt;If you haven't read anything about Sequel, head on over to its rubyforge page at &lt;a href="http://sequel.rubyforge.org/documentation.html"&gt;http://sequel.rubyforge.org/documentation.html&lt;/a&gt;. There's a good amount of information from basics to how you can implement complex associations between models. There's even a link to &lt;a href="http://loriholden.com/"&gt;Lori Holden's&lt;/a&gt; &lt;a href="http://merbcamp.com/video"&gt;MerbCamp&lt;/a&gt; presentation. &lt;br /&gt;&lt;br /&gt;Sequel piqued my interest in many ways: it uses the &lt;a href="http://en.wikipedia.org/wiki/Active_record_pattern"&gt;Active Record Pattern&lt;/a&gt; to create methods from column names, but you can also do a more &lt;a href="http://datamapper.org/doku.php"&gt;DataMapper&lt;/a&gt; style definition of columns inside your model:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/35634.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;You can use Post.create_table! as a sort of automigrate (it will drop and recreate the table). The usage of set_schema is more for test code and experimenting, and I found it very useful when developing sequel_polymorphic and sequel_taggable. &lt;br /&gt;&lt;br /&gt;So, while its easy enough to generate a new merb core app and customize it as you like, if you're going to be generating a lot of apps with the same configurations, its worth learning how to build a stack. Currently its mostly a manual process: you build a gem with a certain structure by hand, and then use your stack with merb-gen. Eventually this will probably be an easily streamlined process, but for now its still up to you to put things together. You can read more about the structure &lt;a href="http://jackndempsey.blogspot.com/2008/10/creating-new-merb-stack-with-templater.html"&gt;here&lt;/a&gt; and take a look at &lt;a href="http://github.com/jackdempsey/merb-sequel-stack/tree/master"&gt;merb-sequel-stack&lt;/a&gt; as well.&lt;br /&gt;&lt;br /&gt;If you're looking to get a bit closer to your DB and want a lot of flexibility and power, you should really take Sequel for a test drive. Its current maintainer, Jeremy Evans, has been a ton of help with answering dozens of questions in #sequel, even when its to answer something he doesn't agree with like polymorphic associations, which I'll go into next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-2235466450199993729?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/2235466450199993729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=2235466450199993729' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2235466450199993729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2235466450199993729'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/12/merb-and-sequel.html' title='merb and sequel'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-6570532680027570361</id><published>2008-12-01T08:49:00.000-08:00</published><updated>2008-12-01T09:07:06.991-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dependency'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='builtbythenet'/><title type='text'>a possible addition to www.builtbythenet.com</title><content type='html'>The same questions get answered many times a day in #merb and I have to think there's a better way, especially for dependency issues.  Whether is a rubygems issue, one with Merb or any of the typical libraries people use it with, or just some random little bug you only see on windows, I haven't seen a good way to track and relate all of this information. Some goes on a wiki, some is remembered and routinely typed back by various people in #merb, some goes to the mailing list. It shouldn't have to be this way, and I'm hoping this idea will help:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://builtbythenet.uservoice.com/pages/general/suggestions/81960"&gt;dependency hell mitigator&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The implementation would be dead simple, probably something like a tag cloud. It'd rely on people entering info and trying to keep things up to date...but hopefully this would result in a more organized and useful collection of all the various tricks we employ to get through those moments of keyboard tossing and mice bashing. &lt;br /&gt;&lt;br /&gt;As usual anyone interested in coding this up is more than welcome to--the source is at &lt;a href="http://github.com/jackdempsey/builtbythenet/tree/master"&gt;jackdempsey/builtbythenet&lt;/a&gt; If enough people like this idea then I'll probably start in on it myself at some point and see where it goes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-6570532680027570361?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/6570532680027570361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=6570532680027570361' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6570532680027570361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6570532680027570361'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/12/possible-addition-to.html' title='a possible addition to www.builtbythenet.com'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-7501428119253733326</id><published>2008-11-24T08:57:00.000-08:00</published><updated>2008-11-24T09:01:33.860-08:00</updated><title type='text'>great article on merb-auth</title><content type='html'>&lt;a href="http://angryamoeba.co.uk/"&gt;angryamoeba&lt;/a&gt; has written up a nice &lt;a href="http://singlecell.angryamoeba.co.uk/post/60951656/an-introduction-to-merb-auth-and-the-wonderful-secrets"&gt;explanation and tutorial of merb-auth&lt;/a&gt; over at his blog. If you've been curious about how the pieces fit together, or just want to get merb-auth up and running, take a moment and head over.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-7501428119253733326?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/7501428119253733326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=7501428119253733326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7501428119253733326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7501428119253733326'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/great-article-on-merb-auth.html' title='great article on merb-auth'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-1463258531892458933</id><published>2008-11-14T15:29:00.000-08:00</published><updated>2008-11-16T10:47:16.805-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='github'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='builtbythenet'/><title type='text'>I launched a site today</title><content type='html'>It takes a number and divides it by 86,400. The next iteration will include functionality to take a number and multiply by 86,400. Amazing right?&lt;br /&gt;&lt;br /&gt;The site has no design. I don't have a business plan. I don't have sales, marketing, QA, or anyone else. And I couldn't care less. &lt;br /&gt;&lt;br /&gt;I realized today that I agree with "release early, release often", that I try to live by those words when I can, but as a developer you only have so much control over what your boss thinks, plans, schedules, and so on. At night you're perfectly free to release any sort of crap you want, when you want to, and similar to my &lt;a href="http://jackndempsey.blogspot.com/2008/11/get-over-yourself-and-write-that-test.html"&gt;recent post on testing&lt;/a&gt;, I've realized I need to just get over my desire to perfect things and refactor ad infinitum, and just ship something. &lt;br /&gt;&lt;br /&gt;So the site is simple. It basically does nothing right now but convert the number of requests per day into what it'd be in requests per second. This came out of a discussion with &lt;a href="http://peepcode.com/"&gt;Topfunky&lt;/a&gt; who was wondering what 8 million requests a day would be in RPS. It was a perfect example feature to spawn the launch of &lt;a href="http://www.builtbythenet.com/"&gt;www.builtbythenet.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The idea is simple--&lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt; brings you "Social Code Hosting" right? Well, think of this as Social Site Building. Users can submit feature requests at &lt;a href="http://builtbythenet.uservoice.com/"&gt;http://builtbythenet.uservoice.com/&lt;/a&gt;, vote for other's ideas, and take part in building a site like never before, because not only do the users drive development, the code is completely open: &lt;a href="http://github.com/jackdempsey/builtbythenet/tree/master"&gt;http://github.com/jackdempsey/builtbythenet/tree/master&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;People often say "I'd love to learn Merb, but am tired of building blogs. What should I build?" Well, now you have something else to try out. I imagine, at least I hope, that over time some great ideas will come out of the ether. The possibilities are endless. The 'goal' in my mind is less about what the end result is, and more about the process and the features along the way. I don't think this will ever be finished. Maybe in a few weeks it'll fall flat on its face and oh no, I'm out a $9.95 domain name. But at least I'll have tried...and if all that comes of this is another example of some Merb code, that's good enough for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-1463258531892458933?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/1463258531892458933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=1463258531892458933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1463258531892458933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1463258531892458933'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/i-launched-site-today.html' title='I launched a site today'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-7825702229216315980</id><published>2008-11-12T20:51:00.000-08:00</published><updated>2008-11-16T10:48:11.986-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rspec'/><category scheme='http://www.blogger.com/atom/ns#' term='github'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>rspec macro methods in Merb</title><content type='html'>While working on spec'ing out this &lt;a href="http://github.com/jackdempsey/merb-service-example/tree/master"&gt;merb-service-example app&lt;/a&gt; I came to a point where I had a lot of repetitive code, enough that I really wanted to DRY it up a bit. Long story short, after talking with &lt;a href="http://blog.davidchelimsky.net/"&gt;David Chelimsky&lt;/a&gt; for a bit, I ended up with this: &lt;a href="http://github.com/jackdempsey/merb-service-example/tree/master/spec/requests/gists_spec.rb"&gt;gists_spec.rb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I think the it_should_respond_with and it_should_return methods work well for adding clarity, reducing repetition, and making the specs even stronger. Still, I'm a bit unhappy with the method names. Some other possibilities thrown out there are:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/24367.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Nothing feels perfect yet...and maybe it doesn't need to be...but, that's never stopped me from trying. What name(s) do you like? Any better suggestions?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-7825702229216315980?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/7825702229216315980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=7825702229216315980' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7825702229216315980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7825702229216315980'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/rspec-macro-methods-in-merb.html' title='rspec macro methods in Merb'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-2040349335998756729</id><published>2008-11-12T10:05:00.000-08:00</published><updated>2008-11-12T14:20:37.659-08:00</updated><title type='text'>Get over yourself and write that test</title><content type='html'>I've had to tell myself this a bit recently...and it wasn't the medium you'd expect. &lt;br /&gt;&lt;br /&gt;I'd been working on a particularly tricky Sudoku puzzle...you know the kind where you've got lots of squares completely solved, and yet some are mostly blank? No matter what I did, I couldn't find a damn 7,8, or 9 to set off a finishing chain of selections. I also have this stubbornness that forces me to try and solve the hard puzzles without using notes. I almost always can, and yet this particular puzzle was besting me. &lt;br /&gt;&lt;br /&gt;Its ok, I just have to try harder, right? Focus more, go over the various possibilities, what could this being here mean, and so on. Another 20 minutes pass and no progress. With a sigh I finally gave up, and started sketching out all of the possibilities. Within 3 seconds of doing so, I saw an obvious selection I had missed. This set off another, and another. 2 minutes later I was done. &lt;br /&gt;&lt;br /&gt;Part of me felt like I "cheated"--any great Sudoku solver wouldn't need such help, right? At the same time, there's a point where the challenge of solving the puzzle degrades into frustration and really a waste of my time, and in this case I had long overshot that mark. &lt;br /&gt;&lt;br /&gt;Feel familiar yet? &lt;br /&gt;&lt;br /&gt;I couldn't help smiling as I thought about this on the metro in this morning. It reminded me of every time I'd sit down to write some code, get it wrong, redo some things, get it right...and then find out I really didn't...and repeat this process until I'd finally write a few tests and voila, be done with it. &lt;br /&gt;&lt;br /&gt;I remember back in college hearing these epic stories of masters who could code in C, top to bottom, and at the end magically compile things without error. I think of people I know who can jump into a presentation, test, interview, or module, and just get what they need done without a moment's hesitation or need of 'backup' or notes. &lt;br /&gt;&lt;br /&gt;I used to be one of those people...but I think lots of us were, back in 5th grade, just excited to learn the next set of formulas or geometric equations. I'm not anymore, and I'm ok with that. There's a certain peace of mind, a certain relaxation I feel, when I have code that's spec'ed, tested, and banged on to the point where I own it, and not the reverse. &lt;br /&gt;&lt;br /&gt;Something I think people don't say enough, even with the tons of discussions about tests: even if your tests suck, even if they mock too much, are too brittle, and perhaps miss some important cases, the knowledge of the code that you receive while writing those tests is extremely valuable. The investment in your own ability to write those tests is extremely valuable. Testing really is like working out, and I've slipped as of late (in both areas), and can feel it. &lt;br /&gt;&lt;br /&gt;I made the decision recently to change both of these things, and just like getting back into the gym has given me more energy and I just feel better, getting back into writing some tests has reminded me just why we should do it in the first place. &lt;br /&gt;&lt;br /&gt;I've been flexing this rebirth with a simple merb 1.0 service example app located at &lt;a href="http://github.com/jackdempsey/merb-service-example/tree/master"&gt;http://github.com/jackdempsey/merb-service-example/tree/master&lt;/a&gt; and you'll see its using the new request helper. I'd talk more about that, but &lt;a href="http://merbcamp.com/video/katz1.mp4"&gt;wycats has done so already&lt;/a&gt;, so I'll just say: you really, really want to test this way as opposed to mocking everything out. It allows for a very fluid and flexible inner workings of your controller, while verifying things come back as they should.&lt;br /&gt;&lt;br /&gt;PS: I even TDD'ed this post via a friend checking it. As you'd expect, I was shown several 'bugs' and issues. Thanks again &lt;a href="http://domainspecific.blogspot.com/"&gt;Doug&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-2040349335998756729?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/2040349335998756729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=2040349335998756729' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2040349335998756729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2040349335998756729'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/get-over-yourself-and-write-that-test.html' title='Get over yourself and write that test'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-351244006870337113</id><published>2008-11-11T23:53:00.000-08:00</published><updated>2008-11-12T00:00:08.142-08:00</updated><title type='text'>Installing Merb 1.0 on Debian</title><content type='html'>This has come up a few times in #merb: as a result of the webrat and nokogiri dependencies, if you're looking to install 1.0 on a Debian box, make sure you have the following packages installed:&lt;br /&gt;&lt;br /&gt;libxml-ruby libxslt-ruby libxml2 libxslt1-dev&lt;br /&gt;&lt;br /&gt;Thanks to mr-interweb and maxbaroi for some late night detective work. The relevant ticket is located at &lt;a href="http://merb.lighthouseapp.com/projects/7433-merb/tickets/986-webrat-is-required-for-merb-core-app-running-in-console#ticket-986-14"&gt;http://merb.lighthouseapp.com/projects/7433-merb/tickets/986-webrat-is-required-for-merb-core-app-running-in-console#ticket-986-14&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-351244006870337113?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/351244006870337113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=351244006870337113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/351244006870337113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/351244006870337113'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/installing-merb-10-on-debian.html' title='Installing Merb 1.0 on Debian'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5474614960839004547</id><published>2008-11-05T21:06:00.000-08:00</published><updated>2008-11-05T21:18:40.099-08:00</updated><title type='text'>acts_as_commentable</title><content type='html'>Recently I've been looking over my various github projects, and am trying to give some love to things I haven't touched in a while. First up: acts_as_commentable. &lt;br /&gt;&lt;br /&gt;A small amount of history first: the plugin was originally developed at http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/ &lt;br /&gt;&lt;br /&gt;There've been many comments on it since then. My original intention was to port it over to something we could use in Merb. Turns out that actually didn't require much...actually, it was basically just an extra require in the library. I've touched things up a bit and have updated the repo at http://github.com/jackdempsey/acts_as_commentable/tree/master&lt;br /&gt;&lt;br /&gt;I've sent an email to the original author as I'm not trying to pirate his/her stuff...we'll see what comes of that, but I noticed the other day that there were 54 or so watchers (and on a tangent--I mentioned that in #github and this might have sparked some ideas along the line of being able to easily see who's watching your repos), so hopefully those who're interested can play with things, and finally have a vehicle to contribute if desired. &lt;br /&gt;&lt;br /&gt;Please feel free to send me comments, patches, etc. Something this widely used is just being for community support and feedback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5474614960839004547?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5474614960839004547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5474614960839004547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5474614960839004547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5474614960839004547'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/actsascommentable.html' title='acts_as_commentable'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-2574438960301556582</id><published>2008-11-02T16:05:00.001-08:00</published><updated>2008-11-02T16:16:36.215-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aliases'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>useful snippets</title><content type='html'>I rely on a number of aliases, shell scripts, and whatever time savers I can come up with. You never know what you might learn by seeing someone elses, so here's a few of my favorites:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/21772.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;I've mentioned the &lt;a href="http://jackndempsey.blogspot.com/2008/07/cdargs.html"&gt;cdargs stuff&lt;/a&gt; before, and there's a great post talking about &lt;a href="http://www.benmabey.com/2008/05/07/git-bash-completion-git-aliases/"&gt;git bash completion&lt;/a&gt;for those interested. &lt;br /&gt;&lt;br /&gt;k, now it's your turn.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-2574438960301556582?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/2574438960301556582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=2574438960301556582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2574438960301556582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2574438960301556582'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/11/useful-snippets.html' title='useful snippets'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-4805783762446803956</id><published>2008-10-20T11:31:00.000-07:00</published><updated>2008-10-20T12:22:18.477-07:00</updated><title type='text'>Creating a new Merb stack with Templater</title><content type='html'>In trying to remove Merb's dependency on ActiveSupport, Jonas Nicklas developed &lt;a href="http://github.com/jnicklas/templater/tree/master"&gt;Templater&lt;/a&gt;. I'm going to show you briefly how to use it to create an ActiveRecord, TestUnit, and Prototype based Merb stack. &lt;br /&gt;&lt;br /&gt;I'd like to make clear at this point that this is more for learning about Merb, generators, and to use as a reference point for creating other stacks. I prefer DataMapper, Rspec, and JQuery, and as such this example stack won't be supported officially or unofficially (unless someone else would like to...if so, let me know). &lt;br /&gt;&lt;br /&gt;You can find the code here: &lt;a href="http://github.com/jackdempsey/merb-ar-stack/tree/master"&gt;http://github.com/jackdempsey/merb-ar-stack/tree/master&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first important piece is the Generators file:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;scope 'merb-gen' do&lt;br /&gt;  dir = File.join(File.dirname(__FILE__), 'lib', 'generators/')&lt;br /&gt;  Merb.add_generators dir + 'merb_ar_stack'&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This file is picked up by Templater and as such, when merb-gen is run, you'll see it listed as one of the available generators. Lets take a look at what merb_ar_stack actually is then. &lt;br /&gt;&lt;br /&gt;merb-ar-stack/lib/generators/merb_ar_stack.rb&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;module Merb&lt;br /&gt;  module Generators&lt;br /&gt;    class MerbArStackGenerator &lt; AppGenerator&lt;br /&gt;      #&lt;br /&gt;      # ==== Paths&lt;br /&gt;      #&lt;br /&gt;&lt;br /&gt;      def self.source_root&lt;br /&gt;        File.join(super, 'application', 'merb_ar_stack')&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      def self.common_templates_dir&lt;br /&gt;        File.expand_path(File.join(File.dirname(__FILE__), 'templates', 'application', 'common'))&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      def destination_root&lt;br /&gt;        File.join(@destination_root, base_name)&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      def common_templates_dir&lt;br /&gt;        self.class.common_templates_dir&lt;br /&gt;      end&lt;br /&gt;      &lt;br /&gt;      def testing_framework&lt;br /&gt;        :test_unit&lt;br /&gt;      end&lt;br /&gt;      &lt;br /&gt;      def orm&lt;br /&gt;        :activerecord&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      #&lt;br /&gt;      # ==== Generator options&lt;br /&gt;      #&lt;br /&gt;&lt;br /&gt;      option :template_engine, :default =&gt; :erb,&lt;br /&gt;      :desc =&gt; 'Template engine to prefer for this application (one of: erb, haml).'&lt;br /&gt;&lt;br /&gt;      desc &lt;&lt;-DESC&lt;br /&gt;      This generates a "prepackaged" (or "opinionated") Merb application that uses ActiveRecord,&lt;br /&gt;      TestUnit, helpers, assets, mailer, caching, slices and merb-auth all out of the box.&lt;br /&gt;    DESC&lt;br /&gt;&lt;br /&gt;      first_argument :name, :required =&gt; true, :desc =&gt; "Application name"&lt;br /&gt;&lt;br /&gt;      #&lt;br /&gt;      # ==== Common directories &amp; files&lt;br /&gt;      #&lt;br /&gt;&lt;br /&gt;      empty_directory :gems, 'gems'&lt;br /&gt;      file :thorfile do |file|&lt;br /&gt;        file.source      = File.join(common_templates_dir, "merb.thor")&lt;br /&gt;        file.destination = "tasks/merb.thor"&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      template :rakefile do |template|&lt;br /&gt;        template.source = File.join(common_templates_dir, "Rakefile")&lt;br /&gt;        template.destination = "Rakefile"&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      file :gitignore do |file|&lt;br /&gt;        file.source = File.join(common_templates_dir, 'dotgitignore')&lt;br /&gt;        file.destination = ".gitignore"&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      file :htaccess do |file|&lt;br /&gt;        file.source = File.join(common_templates_dir, 'dothtaccess')&lt;br /&gt;        file.destination = 'public/.htaccess'&lt;br /&gt;      end&lt;br /&gt;      &lt;br /&gt;      file :doctask do |file|&lt;br /&gt;        file.source = File.join(common_templates_dir, 'doc.thor')&lt;br /&gt;        file.destination = 'tasks/doc.thor'&lt;br /&gt;      end&lt;br /&gt;      &lt;br /&gt;      file :prototype do |file|&lt;br /&gt;        file.source = File.join(common_templates_dir, 'prototype.js')&lt;br /&gt;        file.destination = 'public/javascripts/prototype.js'&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      directory :test_dir do |directory|&lt;br /&gt;        dir = testing_framework == :rspec ? "spec" : "test"&lt;br /&gt;&lt;br /&gt;        directory.source      = File.join(source_root, dir)&lt;br /&gt;        directory.destination = dir&lt;br /&gt;      end&lt;br /&gt;&lt;br /&gt;      #&lt;br /&gt;      # ==== Layout specific things&lt;br /&gt;      #&lt;br /&gt;&lt;br /&gt;      # empty array means all files are considered to be just&lt;br /&gt;      # files, not templates&lt;br /&gt;      glob! "app"&lt;br /&gt;      glob! "autotest"&lt;br /&gt;      glob! "config"&lt;br /&gt;      glob! "doc",      []&lt;br /&gt;      glob! "public"&lt;br /&gt;      glob! "lib"&lt;br /&gt;      glob! "merb"&lt;br /&gt;&lt;br /&gt;      invoke :layout do |generator|&lt;br /&gt;        generator.new(destination_root, options, 'application')&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;    add 'ar-app',   MerbArStackGenerator&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Pretty straightforward, right? You'll see a couple places easily configured to be whatever you like, as well as listing of various files you want to include (like the prototype.js reference). &lt;br /&gt;&lt;br /&gt;Beyond that, you'll see inside lib/generators/templates an application directory that holds a directory for the common files you'll use as well as a directory that actually lays out what the generated app will look like. &lt;br /&gt;&lt;br /&gt;The final important piece is inside the Rakefile:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;gems = [&lt;br /&gt;  ["merb-core", "~&gt; #{GEM_VERSION}"],&lt;br /&gt;  ["merb-more", "~&gt; #{GEM_VERSION}"],&lt;br /&gt;  ["activerecord", "~&gt; 2.1.0"]&lt;br /&gt;]&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This array is used later in the rake file by add_dependency. It takes care of bringing in the various gems needed for your stack. Take a look &lt;a href="http://github.com/wycats/merb/tree/master/merb/Rakefile#L29"&gt;here&lt;/a&gt; to see what the official stack depends upon. &lt;br /&gt;&lt;br /&gt;Thats pretty much it. There are other pieces that you'll want to configure things (like in the config/init.rb file inside your templates/application/merb_ar_stack folder for instance). I'd recommend forking this repo and tinkering with things a bit to get a feel for how it all fits together. &lt;br /&gt;&lt;br /&gt;Things have been a bit busy recently, so I haven't had as much time for blogging as I'd like. I hope to write more in the near future when 1.0 is out and people are looked to really dig into things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-4805783762446803956?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/4805783762446803956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=4805783762446803956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4805783762446803956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4805783762446803956'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/10/creating-new-merb-stack-with-templater.html' title='Creating a new Merb stack with Templater'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-6464692847990452819</id><published>2008-09-09T20:16:00.000-07:00</published><updated>2008-09-09T20:41:32.506-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thor'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='merb-bundler'/><title type='text'>Thor finds Mjolnir</title><content type='html'>If you've been following the development of &lt;a href='http://github.com/wycats/thor/tree/master'&gt;Thor&lt;/a&gt;, you'll know there's been a bug that affected commands with several layers of namespacing. Tonight I'm happy to announce this bug was finally crushed by &lt;a href='http://yehudakatz.com/'&gt;Yehuda Katz&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Just to briefly describe the pain this has brought me, a few facts:&lt;br /&gt;&lt;br /&gt;* Class.constants only gets the top level constants. If you have Foo::Bar::Baz, don't expect to see Baz in Foo.constants&lt;br /&gt;&lt;br /&gt;* Struct is mean:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/9800.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;(You can imagine how the first point led me to the second, right? Yeah...fun. &lt;br /&gt;&lt;br /&gt;* Remember, when you ask for constants on a class, it: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;Returns an array of the names of the constants accessible in mod. This includes the names of constants in any included modules (example at start of section).&lt;/code&gt;&lt;br /&gt;&lt;br /&gt; It _also_ returns constants defined in any class you inherit from. &lt;br /&gt;&lt;br /&gt;So, lets just say this all added up to a nice bit of hacking for me, and truthfully it was a good experience. It started to get old after a while, but I think this is something people don't talk about enough. Its the same with lifting weights: you purposely destroy and rip apart your muscles so they can build up bigger and stronger next time. &lt;br /&gt;&lt;br /&gt;If you don't at least semi-often tackle hard problems, frustrating situations, and just fight through those moments when you think "screw it, PHP isn't that bad", you'll never get the kind of experience that really makes you grow as a Rubyist, and really, a programmer. You'll often find at the end not only did you learn some new tricks, but sometimes the solution is right there before your eyes....or Yehuda's eyes...but still, you'll get a lot out of it. &lt;br /&gt;&lt;br /&gt;So anyway, I'm happy to point people to &lt;a href='http://github.com/wycats/thor/tree/master'&gt;http://github.com/wycats/thor/tree/master&lt;/a&gt; and say 'Enjoy!' The soon to come Merb bundling tasks will be taking advantage of Thor's power, so if you haven't done anything with Thor yet, now's a great time to jump on board.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-6464692847990452819?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/6464692847990452819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=6464692847990452819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6464692847990452819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6464692847990452819'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/09/thor-finds-mjolnir.html' title='Thor finds Mjolnir'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5444269111053178756</id><published>2008-09-06T21:20:00.000-07:00</published><updated>2008-09-06T21:28:00.618-07:00</updated><title type='text'>router redirects</title><content type='html'>Merb's router supports a nice redirect feature:&lt;br /&gt;&lt;br /&gt;r.match('/old-invalid-url').redirect("/hawt-new-goodness")&lt;br /&gt;&lt;br /&gt;One item of note--this redirect defaults to a 301 status, so if you're playing around with this and want 302's instead, pass a false as a second parameter to redirect:&lt;br /&gt;&lt;br /&gt;r.match('/').redirect("/login", false)&lt;br /&gt;&lt;br /&gt;If you happen to confuse this and set a permanent 301, just add in the false, hit the page again, let the 302 be processed, and you should be good after taking out the redirect again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5444269111053178756?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5444269111053178756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5444269111053178756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5444269111053178756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5444269111053178756'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/09/router-redirects.html' title='router redirects'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-7155109389500020925</id><published>2008-09-04T10:59:00.000-07:00</published><updated>2008-09-05T10:10:50.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thor'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>A script to help with Rails -&gt; Merb conversions</title><content type='html'>People have asked often in #merb for something to help with converting Rails apps to Merb apps. There's no magic Wizard to do this for you, but hopefully this will help: &lt;br /&gt;&lt;br /&gt;http://github.com/jackdempsey/find_rails/tree/master&lt;br /&gt;&lt;br /&gt;Its a standalone &lt;a href='http://github.com/wycats/thor/tree/master'&gt;Thor&lt;/a&gt; script that looks in your current directory (or a provided path to an app), finds the app/ directory, and scans through the code for a variety of things that people get tripped up on in Merb. I imagine this list will increase over time, but it will help with some of the obvious ones to start. &lt;br /&gt;&lt;br /&gt;This is very much a work in progress. Running it standalone like this, especially given the way I've organized it, loses some of the flexibility Thor provides. It also makes it easier on the user to invoke. I imagine if this is used by people and grows to be anything bigger than a simple helper script, I'll refactor the way the task is started, so I'd recommend cloning this and playing with the source a bit as well. &lt;br /&gt;&lt;br /&gt;Anyway, if you haven't played with Thor yet, you should give it a go. Its fast, flexible, and a great way to avoid the "fun" of parsing options yourself. &lt;br /&gt;&lt;br /&gt;Currently there's a bit of an issue with installing tasks that have multilevel namespaces. For the time being, I've committed a fix to the constants branch of my fork at http://github.com/jackdempsey/thor/tree/constants&lt;br /&gt;&lt;br /&gt;I foresee this fix getting cleaned up and merged into the main Thor repo soon. In the meantime, if you're looking at using Thor with tasks like foo:bar:baz, this fork will fix things up for you.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I fixed things up a bit so that we can search on regex's as well. This came out of a discussion in #merb re: the tendency to "redirect &amp;&amp; return" in Rails, which is the reverse of what you'll want to do in Merb. &lt;br /&gt;&lt;br /&gt;http://github.com/jackdempsey/find_rails/commit/ea80df077c8cee0959ce1e7b4b17321924f19dc7&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-7155109389500020925?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/7155109389500020925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=7155109389500020925' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7155109389500020925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7155109389500020925'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/09/script-to-help-with-rails-merb.html' title='A script to help with Rails -&gt; Merb conversions'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5755614360885495930</id><published>2008-08-30T20:45:00.000-07:00</published><updated>2008-08-30T20:58:14.100-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='ubiquity'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Experimenting with Ubiquity</title><content type='html'>For those of you who know what Ubiquity is, I'll keep this brief. For the non-initiated, take a second to read about what many describe as Quicksilver for Firefox: &lt;a href='http://labs.mozilla.com/2008/08/introducing-ubiquity/'&gt;http://labs.mozilla.com/2008/08/introducing-ubiquity/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href='https://people.mozilla.com/~avarma/ubiquity-0.1.xpi'&gt;install it here&lt;/a&gt;, &lt;a href='https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_User_Tutorial'&gt;read the tutorial&lt;/a&gt; and then come back when up to speed. &lt;br /&gt; &lt;br /&gt;Cool stuff, right? So I took a look at their wiki earlier and was kind of surprised to find that nothing was listed there for Ruby...but you could search for php functions? Blasphemy...so I took their code and hacked it up a bit:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/8132.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Easiest way to play with this in my opinion is, once you've installed Ubiquity, test it at chrome://ubiquity/content/editor.html&lt;br /&gt;&lt;br /&gt;As you can see from the gist, its pretty easy to create a new command to play with and you can easily add in search capability for your favorite site. If its well known there's a shot someone's done that already. &lt;br /&gt;&lt;br /&gt;Anyway, I thought this was pretty cool and imagine over time it will enable some pretty interesting mashups. Its almost a more powerful and approachable version of &lt;a href='http://pipes.yahoo.com/pipes/'&gt;Yahoo Pipes&lt;/a&gt;, albeit a different sort of beast. &lt;br /&gt;&lt;br /&gt;As I get time I'll be playing more with it, probably hooking up some nice Merb search capabilities. Feel free to drop some comments if you have some ideas, but perhaps aren't familiar with Javascript or coding in general. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5755614360885495930?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5755614360885495930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5755614360885495930' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5755614360885495930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5755614360885495930'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/08/experimenting-with-ubiquity.html' title='Experimenting with Ubiquity'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-4015308598657390105</id><published>2008-08-18T23:56:00.000-07:00</published><updated>2008-08-19T00:20:10.157-07:00</updated><title type='text'>Updated merb-thor tasks</title><content type='html'>Lots of questions have come up regarding sake in #merb recently. The current sake tasks at merbivore.com are out of date, so I updated the tasks inside merb-more itself. You can install using:&lt;br /&gt;&lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;http&lt;span style="color:#A60"&gt;:/&lt;/span&gt;/github.com/jackdempsey/dm-thor/tree/master&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For those interested in Thor, I've also updated the tasks at:&lt;br /&gt;&lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;http&lt;span style="color:#A60"&gt;:/&lt;/span&gt;/github.com/jackdempsey/merb-thor/tree/master&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;They, like the sake tasks, are particular about directory structure, so make sure you've set things up, and run things from the correct directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-4015308598657390105?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/4015308598657390105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=4015308598657390105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4015308598657390105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/4015308598657390105'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/08/updated-merb-thor-tasks.html' title='Updated merb-thor tasks'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-6379407722803009197</id><published>2008-08-06T20:48:00.000-07:00</published><updated>2008-08-06T20:55:47.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><category scheme='http://www.blogger.com/atom/ns#' term='shortcuts'/><title type='text'>A Mac zoom key</title><content type='html'>I'm a bit picky when it comes to how I interact with my system; I have tons of aliases, shortcuts, quicksilver triggers, pretty much anything that will save me typing. One that I use every day is a trigger for Zoom. &lt;br /&gt;&lt;br /&gt;Open up System Preferences and click on Keyboard &amp; Mouse. Select the Keyboard Shortcuts tab, and click on the plus at the left to add a new one. You'll want to type in Zoom and whatever key combo you wish--I like shift-cmd-M. &lt;br /&gt;&lt;br /&gt;Should look something like this: &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NTuH0WWAy0c/SJpx0nShePI/AAAAAAAAAAY/2wPx_650awY/s1600-h/mac_zoom_key.jpg"&gt;&lt;img style="float:top; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_NTuH0WWAy0c/SJpx0nShePI/AAAAAAAAAAY/2wPx_650awY/s320/mac_zoom_key.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5231619065858062578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Save that and open a new terminal window and give it a go. It will of course work in whatever app you can zoom in, I just find I use it in terminal and sometimes my browser almost all the time. &lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-6379407722803009197?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/6379407722803009197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=6379407722803009197' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6379407722803009197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6379407722803009197'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/08/mac-zoom-key.html' title='A Mac zoom key'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NTuH0WWAy0c/SJpx0nShePI/AAAAAAAAAAY/2wPx_650awY/s72-c/mac_zoom_key.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-3279070908051826089</id><published>2008-08-04T22:02:00.000-07:00</published><updated>2008-08-04T22:10:39.295-07:00</updated><title type='text'>merb-dev sake tasks update</title><content type='html'>People mentioned today that the sake tasks were broken, so as of commit 123f1e13e96ba6d42cbb0d25554913ab9851cd6a in merb-more you should be good. I changed the installation of primarily the extlib library, and reordered things a bit. As &lt;a href='http://blog.merbivore.com/2008/07/26/please-stand-by-'&gt;Yehuda mentioned recently&lt;/a&gt;, when living on the edge things can be a bit unstable. The pain this may create now is a small price to pay for a 1.0 release thats solid and easily used by many, so please stay tuned and keep the comments coming in #merb.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-3279070908051826089?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/3279070908051826089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=3279070908051826089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/3279070908051826089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/3279070908051826089'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/08/merb-dev-sake-tasks-update.html' title='merb-dev sake tasks update'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-6389227024401551333</id><published>2008-08-03T21:16:00.000-07:00</published><updated>2008-08-03T21:19:22.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='capistrano'/><title type='text'>a quick note on deploying with git</title><content type='html'>I've deployed a merb app and rails app recently with git, both on slicehost.com boxes. For one I didn't need this option, and yet for the other I did...so, to anyone having issues with git deployment with capistrano, see if this helps. In your deploy.rb file add this line:&lt;br /&gt;&lt;br /&gt;default_run_options[:pty] = true&lt;br /&gt;&lt;br /&gt;The guys at &lt;a href='http://www.github.com'&gt;github.com&lt;/a&gt; mention this in their &lt;a href='http://github.com/guides/deploying-with-capistrano'&gt;guide to deploying with capistrano&lt;/a&gt; as well, so if you need other clues I suggest checking that out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-6389227024401551333?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/6389227024401551333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=6389227024401551333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6389227024401551333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/6389227024401551333'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/08/quick-note-on-deploying-with-git.html' title='a quick note on deploying with git'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-7742683810593669213</id><published>2008-07-14T09:15:00.001-07:00</published><updated>2008-08-19T00:22:17.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rubygems'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='leopoard'/><category scheme='http://www.blogger.com/atom/ns#' term='bus'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><title type='text'>leopard, rubygems, and bus errors</title><content type='html'>Every now and then I catch one of these errors: &lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;br /&gt; 2&lt;br /&gt; 3&lt;br /&gt; 4&lt;br /&gt; &lt;strong&gt;5&lt;/strong&gt;&lt;br /&gt; 6&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;~&lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;git&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;project_foo &lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; rake -&lt;span style="color:#036; font-weight:bold"&gt;T&lt;/span&gt;&lt;br /&gt; (&lt;span style="color:#080; font-weight:bold"&gt;in&lt;/span&gt; &lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;Users&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;jackdempsey/git/project_foo)&lt;br /&gt; &lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;usr&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;local/lib/ruby/gems/&lt;span style="color:#60E; font-weight:bold"&gt;1.8&lt;/span&gt;/gems/libxml-ruby&lt;span style="color:#60E; font-weight:bold"&gt;-0.3&lt;/span&gt;.&lt;span style="color:#60E; font-weight:bold"&gt;8.4&lt;/span&gt;/lib/xml/libxml_so.bundle: [&lt;span style="color:#036; font-weight:bold"&gt;BUG&lt;/span&gt;] &lt;span style="color:#036; font-weight:bold"&gt;Bus&lt;/span&gt; &lt;span style="color:#036; font-weight:bold"&gt;Error&lt;/span&gt;&lt;br /&gt; ruby &lt;span style="color:#60E; font-weight:bold"&gt;1.8&lt;/span&gt;.&lt;span style="color:#00D; font-weight:bold"&gt;6&lt;/span&gt; (&lt;span style="color:#00D; font-weight:bold"&gt;2007&lt;/span&gt;&lt;span style="color:#00D; font-weight:bold"&gt;-09&lt;/span&gt;&lt;span style="color:#00D; font-weight:bold"&gt;-24&lt;/span&gt;) [i686-darwin9.&lt;span style="color:#60E; font-weight:bold"&gt;0.0&lt;/span&gt;]&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Abort&lt;/span&gt; trap&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In my experience this just means that you've done some custom stuff to ruby on your Leopard install, and the bundled gems that come with Leopard these days aren't happy. Simple fix, just uninstall the gem and reinstall. This gives things a chance to build the extensions correctly, and be happy from then on:&lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;br /&gt; 2&lt;br /&gt; 3&lt;br /&gt; 4&lt;br /&gt; &lt;strong&gt;5&lt;/strong&gt;&lt;br /&gt; 6&lt;br /&gt; 7&lt;br /&gt; 8&lt;br /&gt; 9&lt;br /&gt; &lt;strong&gt;10&lt;/strong&gt;&lt;br /&gt; 11&lt;br /&gt; 12&lt;br /&gt; 13&lt;br /&gt; 14&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;~&lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;git&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;project_foo &lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; gem list lib&lt;br /&gt; &lt;br /&gt; *** &lt;span style="color:#036; font-weight:bold"&gt;LOCAL&lt;/span&gt; &lt;span style="color:#036; font-weight:bold"&gt;GEMS&lt;/span&gt; ***&lt;br /&gt; &lt;br /&gt; libxml-ruby (&lt;span style="color:#60E; font-weight:bold"&gt;0.3&lt;/span&gt;.&lt;span style="color:#60E; font-weight:bold"&gt;8.4&lt;/span&gt;)&lt;br /&gt; ~&lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;git&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;project_foo &lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; sudo gem uninstall libxml-ruby&lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Successfully&lt;/span&gt; uninstalled libxml-ruby&lt;span style="color:#60E; font-weight:bold"&gt;-0.3&lt;/span&gt;.&lt;span style="color:#60E; font-weight:bold"&gt;8.4&lt;/span&gt;&lt;br /&gt; ~&lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;git&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;project_foo &lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; sudo gem install libxml-ruby&lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Building&lt;/span&gt; native extensions.  &lt;span style="color:#036; font-weight:bold"&gt;This&lt;/span&gt; could take a &lt;span style="color:#080; font-weight:bold"&gt;while&lt;/span&gt;...&lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Successfully&lt;/span&gt; installed libxml-ruby&lt;span style="color:#60E; font-weight:bold"&gt;-0.7&lt;/span&gt;.&lt;span style="color:#00D; font-weight:bold"&gt;0&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#00D; font-weight:bold"&gt;1&lt;/span&gt; gem installed&lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Installing&lt;/span&gt; ri documentation &lt;span style="color:#080; font-weight:bold"&gt;for&lt;/span&gt; libxml-ruby&lt;span style="color:#60E; font-weight:bold"&gt;-0.7&lt;/span&gt;.&lt;span style="color:#00D; font-weight:bold"&gt;0&lt;/span&gt;...&lt;br /&gt; &lt;span style="color:#036; font-weight:bold"&gt;Installing&lt;/span&gt; &lt;span style="color:#036; font-weight:bold"&gt;RDoc&lt;/span&gt; documentation &lt;span style="color:#080; font-weight:bold"&gt;for&lt;/span&gt; libxml-ruby&lt;span style="color:#60E; font-weight:bold"&gt;-0.7&lt;/span&gt;.&lt;span style="color:#00D; font-weight:bold"&gt;0&lt;/span&gt;...&lt;br /&gt; ~&lt;span style="background-color:#fff0ff"&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;span style="color:#808"&gt;git&lt;/span&gt;&lt;span style="color:#404"&gt;/&lt;/span&gt;&lt;/span&gt;project_foo &lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; rake -&lt;span style="color:#036; font-weight:bold"&gt;T&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;(things show nicely now)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-7742683810593669213?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/7742683810593669213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=7742683810593669213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7742683810593669213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7742683810593669213'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/07/leopard-rubygems-and-bus-errors.html' title='leopard, rubygems, and bus errors'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-7967155463861299886</id><published>2008-07-10T19:02:00.000-07:00</published><updated>2008-07-10T19:04:36.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='production'/><category scheme='http://www.blogger.com/atom/ns#' term='log'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>logging to a file in production merb</title><content type='html'>This comes up often in #merb. You can use several flags to customize things nicely:&lt;br /&gt;&lt;br /&gt;merb -e production -l debug -d&lt;br /&gt;&lt;br /&gt;This sets merb to run in the production environment, to use a log level of debug (use merb --help to see the others), and -d to daemonize and not log things to the console window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-7967155463861299886?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/7967155463861299886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=7967155463861299886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7967155463861299886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/7967155463861299886'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/07/logging-to-file-in-production-merb.html' title='logging to a file in production merb'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-3113253525332978526</id><published>2008-07-10T16:44:00.000-07:00</published><updated>2008-09-16T12:37:17.684-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thor'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>introducing merb-thor</title><content type='html'>About a year ago I was working with an ActiveRecord model, and for some reason things would blow up when I tried to do anything to this model inside rake. Turns out having a field called 'link' was a very bad idea, given the rake code bel&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;br /&gt; 2&lt;br /&gt; 3&lt;br /&gt; 4&lt;br /&gt; &lt;strong&gt;5&lt;/strong&gt;&lt;br /&gt; 6&lt;br /&gt; 7&lt;br /&gt; 8&lt;br /&gt; 9&lt;br /&gt; &lt;strong&gt;10&lt;/strong&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#888"&gt;# ###########################################################################&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#888"&gt;# Include the FileUtils file manipulation functions in the top level module,&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#888"&gt;# but mark them private so that they don't unintentionally define methods on&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#888"&gt;# other objects.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; include &lt;span style="color:#036; font-weight:bold"&gt;RakeFileUtils&lt;/span&gt;&lt;br /&gt; private(*&lt;span style="color:#036; font-weight:bold"&gt;FileUtils&lt;/span&gt;.instance_methods(&lt;span style="color:#038; font-weight:bold"&gt;false&lt;/span&gt;))&lt;br /&gt; private(*&lt;span style="color:#036; font-weight:bold"&gt;RakeFileUtils&lt;/span&gt;.instance_methods(&lt;span style="color:#038; font-weight:bold"&gt;false&lt;/span&gt;))&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#888"&gt;##################################################################&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The problem is our friend "send" and the fact that it could care less about the call to private. This cost me the better part of a night, and I guess I've never really forgiven rake for it...&lt;br /&gt;&lt;br /&gt;Enter thor. If you haven't heard of this, take a look &lt;a href='http://yehudakatz.com/2008/05/12/by-thors-hammer/'&gt;here&lt;/a&gt; and see what you think.  The code is practically 100% covered by specs, and is easy to dive into...and something just feels better about defining plain old ruby methods instead of tasks. &lt;br /&gt;&lt;br /&gt;So, in the interest of learning thor better, I took the merb sake tasks and converted them to their thor equivalents. The end result is found at &lt;a href='http://github.com/jackdempsey/merb-thor/tree/master'&gt;http://github.com/jackdempsey/merb-thor/tree/master&lt;/a&gt; and once you have thor installed you should install the file with&lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; thor install http&lt;span style="color:#A60"&gt;:/&lt;/span&gt;/github.com/jackdempsey/merb-thor/tree/master%&lt;span style="color:#00D; font-weight:bold"&gt;2&lt;/span&gt;&lt;span style="color:#036; font-weight:bold"&gt;Fmerb&lt;/span&gt;.thor?raw=&lt;span style="color:#038; font-weight:bold"&gt;true&lt;/span&gt; --as=merb&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The --as option lets you name things nicely so in the future you can do&lt;br /&gt;&lt;table class="CodeRay"&gt;&lt;tr&gt;   &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#F00; background-color:#FAA"&gt;$&lt;/span&gt; thor update merb&lt;/pre&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to get any new stuff thats added in. &lt;br /&gt;&lt;br /&gt;I'm happy to take comments, updates, patches, etc. Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update&lt;/b&gt;&lt;br /&gt;There appears to be a small bug with namespacing of commands. For the time being, all of the commands should work if you run them inside a directory where merb.thor exists. I hope to have this fixed over the next few days, but til then, this should be a quick solution.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update Part Deux&lt;/b&gt;&lt;br /&gt;I've created a fork of thor in a branch you can find at: &lt;a href='http://github.com/jackdempsey/thor/tree/constants'&gt;http://github.com/jackdempsey/thor/tree/constants&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you install from here thor will load all .thor files it finds in your root whether they're relevant or not. This will get around the constants issue preventing things like 'thor merb:gems:refresh' from working.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update Part Finale&lt;/b&gt;&lt;br /&gt;So merb-thor has grown up and become part of the merb stack. I've updated the repo to point to the new goodness, but if you're reading this you can go there directly: &lt;br /&gt;&lt;br /&gt;http://merbunity.com/tutorials/18&lt;br /&gt;&lt;br /&gt;Much thanks to those who've shown interest in it, sent me patches, etc, I appreciate it. I'll be working on new and exciting stuff with Thor in the future, and if you have thoughts/ideas on things like http://github.com/jackdempsey/self-deprecated let me know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-3113253525332978526?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/3113253525332978526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=3113253525332978526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/3113253525332978526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/3113253525332978526'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/07/introducing-merb-thor.html' title='introducing merb-thor'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-1861860934733528952</id><published>2008-07-10T08:59:00.000-07:00</published><updated>2008-09-11T09:10:47.319-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='tips and tricks'/><title type='text'>cdargs</title><content type='html'>I'm a fan of aliases and basically anything else that can help me type less when doing stuff on the command line. My home directory often has a number of symbolic links to various projects and libraries, and 'til now I've gotten by with this amalgamation of tools and techniques just fine. &lt;br /&gt;&lt;br /&gt;Still, I'm always looking out for new tips and tricks, and one of the best and easiest ways to pick up some invaluable knowledge from others is to see how they use their shell. I forget sometimes that some of the shortcuts I know and love aren't used by others; I've had people say "wait, what was that?" when I do&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ mkdir something_here&lt;br /&gt;$ cd !$&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;or even a simple !!, !mer, ctrl+r rake, etc. Still, you can only know so much, and recently I was that person saying "waaaiiit a sec..." while watching &lt;a href='http://yehudakatz.com/'&gt;wycats&lt;/a&gt; fly around various directories with this little command 'cv'. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Enter cdargs&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Take a look at its homepage here &lt;a href='http://www.skamphausen.de/cgi-bin/ska/CDargs'&gt;http://www.skamphausen.de/cgi-bin/ska/CDargs&lt;/a&gt; and come back when done scanning. &lt;br /&gt;&lt;br /&gt;If you follow the instructions you'll have a nice and small 'cv' command at your disposal. Now, maybe it was related to the fact that I was doing this at 3am, but I definitely didn't get it at first, and its actually quite simple. &lt;br /&gt;&lt;br /&gt;In browse mode you can easily traverse your file system and type 'a' along the way to add directories to your list. This means that you can just type 'cv' from anywhere, easily select something from your list, and change to it quickly. Nice, but still a little verbose for my liking. However, you can also use a name from your list and cv to it directly, which is just damn cool. &lt;br /&gt;&lt;br /&gt;So, an example. My current list looks something like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; 0 [merb      ]  /Users/jackdempsey/git/merb&lt;br /&gt; 1 [thor      ]  /Users/jackdempsey/git/thor&lt;br /&gt; 2 [dm        ]  /Users/jackdempsey/git/dm&lt;br /&gt; 3 [git       ]  /Users/jackdempsey/git&lt;br /&gt; 4 [recollectr] !/Users/jackdempsey/recollectr&lt;br /&gt; 6 [testbed   ]  /Users/jackdempsey/testbed&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Which means from any location i can type 'cv git' or 'cv merb' etc and jump to the directory directly. So much nicer than the 'cd ~/symbolic_link_here' that I've gotten used to. &lt;br /&gt;&lt;br /&gt;So try it out. I think its one of those things that as soon as you build up the muscle memory for it, you'll never want to go back. Much thanks to Yehuda for showing me the light on this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-1861860934733528952?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/1861860934733528952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=1861860934733528952' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1861860934733528952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1861860934733528952'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/07/cdargs.html' title='cdargs'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-1334936978435157221</id><published>2008-07-05T14:21:00.000-07:00</published><updated>2008-07-10T17:08:29.548-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merb-auth'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='merb-slices'/><title type='text'>merb-auth, webrat, and merb_stories</title><content type='html'>Recently I've been working on getting some stories written for &lt;a href='http://www.recollectr.com'&gt;www.recollectr.com&lt;/a&gt; and given that I just added in MerbAuth support, I thought now would be a good time to dive back into the previously paused process. &lt;br /&gt;&lt;br /&gt;If you're interested in using webrat for merb_stories, you'll want to get the fork that supports merb from here: &lt;br /&gt;&lt;br /&gt;http://github.com/gwynm/webrat/tree/master&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'd previously had some stories working with webrat and edge merb, but it looked like the upgrade to using MerbAuth in slice form broke some things. After some investigation I realized that the namespacing that's used in merb-slices was slightly different than what the merb supported fork of webrat was happy with...gwynm's fork adds a cookies= method to Application as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Application &lt; Merb::Controller&lt;br /&gt;  def cookies=(newcookies)&lt;br /&gt;    @_cookies = newcookies&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is fine except with MerbAuth, we have MerbAuth::Application, and as such things were busted a bit. So, doing the same for MerbAuth::Application fixed things right up:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;module MerbAuth&lt;br /&gt;  class Application &lt; Merb::Controller&lt;br /&gt;    def cookies=(newcookies)&lt;br /&gt;      @_cookies = newcookies&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thing is, this doesn't exactly belong in MerbAuth as its specific to webrat....and it doesn't exactly belong in webrat as its going to be an issue to any merb-slice. So for the time being I have this in my app code, and things work nicely. I'll probably write a little more and maybe give some examples for general webrat and merb_stories usage, but til then hope this helps anyone else trying all three of these great components.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-1334936978435157221?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/1334936978435157221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=1334936978435157221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1334936978435157221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/1334936978435157221'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/07/merb-auth-webrat-and-merbstories.html' title='merb-auth, webrat, and merb_stories'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-8881570406401064263</id><published>2008-06-29T20:36:00.000-07:00</published><updated>2008-06-29T21:09:25.992-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>undefined method 'each' for nil</title><content type='html'>A common error that trips up Rails converts is the fact that you need to manually call 'render' inside your controller actions. If you don't, you'll see something like this:&lt;br /&gt;&lt;br /&gt;/usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.4/lib/merb-core/rack/handler/mongrel.rb:85:in `process': undefined method `each' for nil:NilClass (NoMethodError)&lt;br /&gt;&lt;br /&gt;You'll see the code around line 85 is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;         if Proc === body&lt;br /&gt;              body.call(response)&lt;br /&gt;         else  &lt;br /&gt;              body.each { |part|&lt;br /&gt;                response.body &lt;&lt; part&lt;br /&gt;              }&lt;br /&gt;         end&lt;br /&gt;&lt;/pre&gt;   &lt;br /&gt;As you can see, if nothing is returned from your action, body will be nil, and the each call will fail with the above message. &lt;br /&gt;&lt;br /&gt;There's a plugin in the works to help catch some of these issues. In the meantime, I hope this helps!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-8881570406401064263?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/8881570406401064263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=8881570406401064263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8881570406401064263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/8881570406401064263'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/06/undefined-method-each-for-nil.html' title='undefined method &apos;each&apos; for nil'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-2251387560912870137</id><published>2008-06-29T20:28:00.000-07:00</published><updated>2008-06-29T20:33:27.258-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>assets not displaying</title><content type='html'>A change was made recently to how Merb handles assets, and the result is that users with apps that predate this change will not have their assets displayed. The quickest fix is to delete the config/rack.rb file in your app and let the Merb defaults handle things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-2251387560912870137?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/2251387560912870137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=2251387560912870137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2251387560912870137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/2251387560912870137'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/06/assets-not-displaying.html' title='assets not displaying'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5806805088141953456</id><published>2008-06-29T20:21:00.000-07:00</published><updated>2008-06-29T20:27:55.375-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><title type='text'>issues with dependency</title><content type='html'>Some people have reported issues with using dependency to load gems into their environment. The issues are hard to track as it works for some and fails for others. If you do find yourself with gems not loading from a dependency call, you can always use require. &lt;br /&gt;&lt;br /&gt;This issue is known and effort will be made to have it resolved by Merb 1.0. Til then, require when needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5806805088141953456?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5806805088141953456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5806805088141953456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5806805088141953456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5806805088141953456'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/06/issues-with-dependency.html' title='issues with dependency'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4467999944823309015.post-5244862980636803239</id><published>2008-06-29T17:01:00.000-07:00</published><updated>2008-06-29T17:30:38.732-07:00</updated><title type='text'>superclass mismatch</title><content type='html'>A 'superclass mismatch'  is ruby's way of telling you that you're trying to define/open a class who's superclass is different than what its previously recorded. An example:&lt;br /&gt;&lt;br /&gt;irb(main):001:0&gt; class Foo; end&lt;br /&gt;=&gt; nil&lt;br /&gt;irb(main):002:0&gt; class Bar; end&lt;br /&gt;=&gt; nil&lt;br /&gt;irb(main):003:0&gt; class Baz &lt; Foo; end&lt;br /&gt;=&gt; nil&lt;br /&gt;irb(main):004:0&gt; class Baz &lt; Bar; end&lt;br /&gt;TypeError: superclass mismatch for class Baz&lt;br /&gt; from (irb):4&lt;br /&gt; from :0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What this usually means is that you're using a name thats already been used, and often you may not realize it. Earlier today someone in #merb had this exact issue when trying to define a class named Region. So, if you see this error popup, you can usually rename your class to something else to make sure the name is unique and that you're not inadvertently reopening a previously defined class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4467999944823309015-5244862980636803239?l=jackndempsey.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jackndempsey.blogspot.com/feeds/5244862980636803239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4467999944823309015&amp;postID=5244862980636803239' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5244862980636803239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4467999944823309015/posts/default/5244862980636803239'/><link rel='alternate' type='text/html' href='http://jackndempsey.blogspot.com/2008/06/superclass-mismatch.html' title='superclass mismatch'/><author><name>Jack Dempsey</name><uri>http://www.blogger.com/profile/17940809933407388413</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp3.blogger.com/_NTuH0WWAy0c/SGhUjkATJrI/AAAAAAAAAAM/PQYjxxNSVcY/S220/face.png'/></author><thr:total>1</thr:total></entry></feed>
