I was reminded that I’ve been missing out on our sweet laptop script, which is a program we maintain to get a Rails environment set up on OS X as quickly as possible. So over the past week, Antonio Salazar Cardozo (Shadowfiend) fixed our capitalization of Qt (b667280), Prem Sichanugrist (sikachu) fixed our capitalization of JavaScript (87fe88f), and Dan Croak (croaky) removed the deprecated Heroku Labs plugin (842cd0d) and gave instructions on installing the command-line XCode tools (a177cca).
The suspenders gem, which has helped many people start a Rails app, now shows that the build is broken. Gabe Berke-Williams (gabebw) added that (76e42eb).
The shoulda-matchers gem is a collection of RSpec matchers for various Rails things. Gabe Berke-Williams (gabebw) went to town on it this week, cleaning everything up in an effort to make it more pleasant to hack on (2b98e49, 09544fa, 7b3d6d0, 96df0b1, 36006d8, 4ff1344, 3b3181b, 4574f51, 1c517d2, bd52483, e70e1bf, 41bccc8). Having done that, he added a :primary option to the have_db_column matcher (68e65b2). Matthew Daubert (MDaubs) fixed a JRuby failure and also added support for Rails 3.0 (d85503f).
Due to my complaining last week, the bourne gem now has a NEWS file (8dfb077), thanks to Gabe Berke-Williams (gabebw).
So we have this gem named paperclip. You might have heard of it. This week, Tony Brewerio (tony-brewerio) fixed the :content_type validator (c4c22f8).
Prem Sichanugrist (sikachu) released version 3.0.1, which breaks backward compatibility (d61ddd5, 51bb0f9, 7088f5b, e1951ed, 9ea4a9b, 36d1289, 8390516, b3f9690, 8e80310, ee4107a, b3a63ed, 8a758c2, 84d2d08, fe706c6, b54904e, d3a7427, da5d716, ee42b19, e83f88f, 03f777f, 5232b19, 19aedbc).
Jon Yurek (jyurek) merged in something he has been working on: adapters for different types of I/O (6c5fe19, e10edcd, f4b6d48, 78cfebd, 89c8d11). Adding new file-like things is now easier, including URLs that act like files. Yeah, that’s right.
Jon is so going to write a blog post about this with more explanations, after he updates the README.
A bunch of fun commits to factory_girl this week. Chris Griego (cgriego) used pull requests as a forum to promote his ActiveAttr gem (81c9f2c and 4e2a672). Joshua Clayton (joshuaclayton) added a before_create callback (24d417d).
Vasiliy Ermolovich (nashby) used ActiveSupport for deprecation warnings (bca13f1 and 28e3c25) and also made use of the singleton_class method in Ruby 1.9 (08d01c1).
Mike Subelsky (subelsky) fixed a typo in the docs around the name FactoryGirl::Syntax::Methods (266b1d6), Dan Croak (croaky) mentioned the supported Ruby versions in the README (bed50ec), Josh renamed Changelog to NEWS because that’s exactly what it is (4f5b775) and also renamed *rb files to *erb to handle yardoc better (a6ccbcb).
I totally dropped the ball on releasing a new version of capybara-webkit this week. Sorry about that! Joe Ferris (jferris), however, refactored some of the C++, which is very welcome (c2a2bd0 and 4531f65).
Some news in our appraisal gem this week: Gabe Berke-Williams (gabebw) added a contribution guideline (fd05fdf), then osheroff fixed appraisal to handle weird filenames (1d4fa93, b21220a, and 75a4970).
Well, howdy there!
Have you been…
…interested in building web application, but aren’t sure where to start? We’ve all been beginners once, so let us lend a hand!
…seeking a technical co-founder, but finding it difficult? Investing the time to learn programming will do wonders. You’ll be better equipped to sniff out quality developers, and quite possibly knock out a prototype on your own.
…teaching yourself Ruby or self-studying on Rails and running into questions? Rubber Ducking can help, but it’s not nearly as much fun as meeting your fellow Boston Rubyists.
…programming Ruby or Rails for a little while (or a long while) and are looking to help teach and welcome new folks to the community?
Drop by the thoughtbot office this Tuesday, October 4, at 7pm. We’ll be hosting a structured session on getting your laptop set up for Ruby development. We’ll be following the process described here and be available for debugging:
2011 Rubyist’s guide to a Mac OS X development environment
Please RSVP to the event so we know how much food and how many drinks to get. We’re happy to field questions ahead of time in the comments below, or you can sign up for the Boston Ruby mailing list, mosey over to the email thread for this meetup, and say hello!
It’s been two and a half years since my last laptop. It’s neat to look back and see how much has improved since then for setting up a Ruby development environment.
Of particular note, Homebrew, RVM, and Bundler did not exist back then.
Here’s how I set up an OS X 10.7 (Lion) thoughtbot laptop in 2011.
I need GCC to help install everything else so I downloaded GCC for Lion.
We used to have to install XCode to get GCC when OS X wasn’t for developers, which was a 3-4GB download and took 10GB+ of space. Buzzkill.
However, Kenneth Reitz, one of the Readability guys, fixed this with his OS X GCC installer, which is a comparatively svelte 272MB download.
Later on, when we’re installing things using Homebrew, we’ll see warnings like:
Xcode is not installed! Builds may fail!
But, the builds will build fine.
While that’s installing, we’ll customize our environment a little.
I need a public key to get access to private Github repositories.
ssh-keygen -t rsa
I’m kept hitting “enter” until it was done. Alternatively, I could have brought my old SSH key over but I’m not into falconry.
We have a standard set of configurations for vim, irb, git, zsh, and more.
I cloned the repo:
git clone git://github.com/thoughtbot/dotfiles.git
I ran the installer:
./install.sh
This sets up the appropriate symlinks (~/.vimrc, ~/.irbrc, etc.). I’ll stay up-to-date and contribute using the fork-track-update flow described in the README.
Our dotfiles assume zsh so I switched from the bash default to zsh:
chsh -s /bin/zsh
We’re pretty much all vim users here so it’s nice having super-quick home-row access to the Control key… and who uses Caps Lock, anyway?
System Preferences > Keyboard > Modifier Keys
Already installed by default, but I set the global config:
git config --global user.name "Your Name"
git config --global user.email you@example.com
I’m using Heroku for all my apps right now. However, thoughtbot’s clients and even our own apps like Trajectory are not owned by my Heroku account. So, it comes in handy to be able to switch to a different account on a project basis.
heroku plugins:install git://github.com/ddollar/heroku-accounts.git
heroku accounts:add dan --auto
heroku accounts:add thoughtbot --auto
heroku accounts:add client --auto
heroku accounts:default dan
Once GCC is downloaded and installed, I’m ready for the heavy-duty installation using our laptop script.
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)
This installs:
It took about 15 minutes for everything to install.
While it’s running, it copies your SSH key to the clipboard and opens your Github SSH page. Paste your SSH key so your Github account is authenticated to your machine.
We wrote a laptop script because we help hundreds of people a year get a Ruby development environment set up at workshops and Boston Ruby hackfests. One time we set up 30 business school students’ laptops in 3 hours.
If you read our source, you’ll see it it’s very simple but more invasive than, say, the excellent Cinderella by Corey Donohoe, which uses Chef to keep your machine tidy. We’re assuming the person definitely wants a “thoughtbot laptop”.
It’s pretty easy to write a wrapper that installs Homebrew, RVM, and your favorite databases and gems so consider forking our project and writing your own script, just like you might write your own Rails template script like Suspenders.

After three years of discussion and controversy, the One Laptop Per Child project is finally selling real laptops for real children. They’re $200, and right now they’re running a promotion called Give 1, Get 1, where you can pay for two laptops; one gets sent to a child in need somewhere in the world, and one gets sent to you! It plays right into us Americans’ psyche—we get to satisfy our guilt over not being more charitable, and we get to play around with one of the coolest gadgets in the world. thoughtbot has decided to support the OLPC, and today we purchased a pair of OLPC XO-1 laptops.
The whole One Laptop Per Child project is a terrific idea, will continue to do a great deal of good, and the physical laptop that’s come out of it is using some incredible software. Like with Hackety Hack, the most compelling feature is the social interaction. I could go into lots of detail here on the software and hardware that make this laptop such an achievement, but you’re better off going to its Wikipedia page and seeing it for yourself.
Some people have strong criticisms of the OLPC. If you’re one, read the New York Times’ hands-on review of the laptop and see if your concerns aren’t assuaged.
Update: The Give 1, Get 1 program has been extended to December 31st. Excellent!.
There are -only 6 days left, so think about making this one of your early Christmas gifts to the world this year. Ask your company if they’d like to participate too—they’ll be a good corporate citizen, have something cool to blog about, and the reward of a crazy laptop to bounce around the office isn’t a bad incentive, either. For $400, everyone wins.

Images taken from laptop.org, licensed under the Creative Commons Attribution 2.5.