Some comments & questions from someone who's worked on something similar:<p>-What's extglob used here for? I don't see any regexes.<p>-What are libffi-dev and libyaml-dev for? I assume some common gems depend on them. If so, which? (I'm just getting into Rails.)<p>-Git in the Maverick repos is old (1.7.1, which was released in April). Installing it from source is probably a better idea.<p>-You should probably use RVM to install Ruby, since its 1.9.2-head target won't require you to keep updating your script with 1.9.2's patchlevel.<p>-In my rails3.sh (which I should really publish), I didn't need to `gem install bundler` in order for `bundle install` to work. Probably because `rails` depends on `bundler`.<p>-That sudo check is neat, and I'd like to lift it; what's this script's license?