Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Author Archives: Peter Cooper

By Peter Cooper / January 4, 2011

haha-funny.pngVCR is a library by Myron Marston that records your test suite’s HTTP interactions so that they can be quickly replayed during future test runs. The big win is that you get predictable, quick and accurate tests. If you need to update the data, just delete the fixtures VCR generates and you’re good to go.

On the surface, VCR sounds like it copies the work of libraries like FakeWeb and Webmock, but VCR uses those libraries to provide a cleaner, more abstracted experience. VCR supports the mocking features of FakeWeb, Webmock, Typhoeus and Faraday out of the box, and further, supports multiple HTTP client libraries including Net::HTTP, Typhoeus, HTTPClient, Curb, Patron, em-http-request and Net::HTTP-based clients like HTTParty, RESTClient and Mechanize. Read More

By Peter Cooper / January 3, 2011


At RubyConf X in November 2010, Aaron Patterson (a.k.a tenderlove) gave a 45 minute talk called ZOMG WHY IS THIS CODE SO SLOW? The video of this conference, as recorded by the always awesome Confreaks, is now online. It’s a must watch, if only to learn how he got commit access to both Ruby and Rails (a rare feat indeed). In the talk Aaron examines his work on Arel (as used to build up SQL queries in Rails 3.0) and how he boosted its performance, a topic he also covered in an October 2010 blog post.

The official synopsis:

Just go watch it folks. Read More

By Peter Cooper / January 3, 2011

codelesson.pngStarting January 10, 2011 (just one week after this post), I’ll be teaching an online Ruby course with – me being Peter Cooper, author of Beginning Ruby. It lasts 4 weeks and will cover most things a new Ruby developer (or programmer in general) needs to know to become a confident, intermediate-level Rubyist. It’s a great springboard from which to move on to Rails or other more advanced Ruby topics.

Naturally, the course is below the experience level of most Ruby Inside readers, but it might suit your boss, your new non-Ruby co-workers, or merely anyone you know who has some tech savvy and would find learning programming in Ruby a buzz. Read More

By Peter Cooper / January 3, 2011

jobs.pngIt looks like California’s the place to be if you’re a Rubyist or Rails developer looking for a full-time position right now. 6 of today’s 9 positions are in California with 5 of those in the Bay Area. Elsewhere, there are also positions in Texas, Illinois, and the UK. Good luck!

The Jobs

Solar Universe is looking for a Rails Developer in Livermore, California. Solar Universe is an interesting solar energy installation and financing company.

Spiceworks is looking for a User Interface Developer in Austin, Texas. Spiceworks develops social business applications. A degree in math, engineer, CS, or related field is preferred. Read More

By Peter Cooper / December 29, 2010

For better or worse, Ubuntu has become one of the most popular Linux variants on which to deploy Ruby and Rails apps. It was used for 84% of the 2010 Rails Rumble projects, for example. Back in 2009, I wrote a guide to installing a Ruby 1.8 stack on Ubuntu 8.10 so it was only a matter of time before I had to tackle 10.10 (Maverick Meerkat) and Ruby 1.9.

Tip: If you’re still on 1.8, check out The Ruby 1.9 Walkthrough, a mega screencast aimed at Ruby 1.8.7 developers who want to learn all about what’s new, what’s gone, and what’s different in Ruby 1.9.2 and 1.9.3. Read More

By Peter Cooper / December 28, 2010

Recently-minted Ruby webapp hosting gods Heroku and real-time “search as a service” provider IndexTank have teamed up to present the Heroku + IndexTank Application Contest. Prizes include an 11.6″ MacBook Air, a Lilliput Mini USB monitor, and an Electronic Rock Guitar shirt. It’s open to US developers only (boo!) and entries are due by January 6, 2011.

IndexTank is one of Heroku’s new add-on partners providing search-as-a-service to folks running apps on the Heroku platform. Essentially, it’s a giant “search in a box” service you can push data into and query in real-time. They worry about providing a search service just like Heroku worries about keeping your app running. Read More

By Peter Cooper / December 27, 2010

bauble.pngChristmas is a special time for Rubyists and not only for those of us taking the opportunity to get drunk and eat a lot. December 25 has been a popular release date since Ruby 1.0 was released on December 25, 1996 and several developers were preparing releases of their libraries and Ruby implementations this year too. So what December 25, 2010 bring?

Ruby 1.8.7 patchlevel 330

At 9am GMT on Christmas Day, Urabe Shyouhei posted the release announcement for the latest patchlevel version of Ruby 1.8.7 to the ruby-talk mailing list:

Intriguingly, he also noted that Ruby has changed license recently and this is the first release since the switch:

Ruby 1.9.2 patchlevel 136

The latest version of the production-ready Ruby 1.9.2 was announced by Yuki (Yugui) Sonoda who notes it fixes “many bugs” found in 1.9.2-p0. Read More

By Peter Cooper / December 22, 2010

rubinius.pngThree months on from the 1.1 release, Rubinius 1.2 has hit the streets bringing together 242 commits from 10 developers. As well as the typical bugfixes and performance tweaks that come with any implementation update, 1.2 brings some underlying structural changes that set up the path to getting better Windows support, Ruby 1.9 support, and the removal of the much-loathed GIL (Global Interpreter Lock) in future releases.

Documentation A Priority

1.2 also sees some leaps forward in the documentation department, led by Brian Ford of Engine Yard. There’s now multilingual documentation available on the Web in English, German, Spanish, Japanese, and Russian (but with many holes – that’s where your help is needed). Read More

By Peter Cooper / December 20, 2010

tr3w.pngThe Rails 3 Way is the much awaited, Rails 3-focused followup to The Rails Way, a popular Rails book (and, dare I say, bible) by Obie Fernandez. It features forewords by David Heinemeier Hansson and Yehuda Katz and checks in at a desk-thumping 759 pages of full-on Rails 3 goodness (despite the book sites claiming 850 pages). I’ve given it the once-over.

My General Conclusion

The Rails 3 Way is an interesting book representing a large amount of effort digging into Rails 3. It shares insights and technical knowledge you’d struggle to patch together from blog posts and documentation. It’s a very opinionated book and will not be to everyone’s taste. Read More

By Peter Cooper / December 15, 2010

cooldude.pngBeen missing esteemed rapper and author Coolio (real name Tony Arcieri) recently? He’s been busy studying Ruby and building (or GitHub repo), a Node.js and Sinatra inspired “event framework” for Ruby powered by libev. Think EventMachine but with a cuter, Sinatra-style API. isn’t exactly new, though, it’s a rewrite-meets-rebrand of Rev (which started life back in 2007).

You can install with gem install (it just feels weird to have a period in a gem name, no?) and be up and running quickly with’s default example script:

require ‘rubygems’
require ‘’

ADDR = ’′
PORT = 4321 ADDR, PORT do
on_connect do
puts “#{remote_addr}:#{remote_port} connected”

on_close do
puts “#{remote_addr}:#{remote_port} disconnected”

on_read do |data|
write data

puts “Echo server listening on #{ADDR}:#{PORT}”

This program listens on localhost at port 4321, accepts connections, and echos data back to them. Read More

By Peter Cooper / December 14, 2010

rwind.pngAs 2010 comes to a close, I’ve dug through Ruby Inside archives to remind myself how far the Ruby scene has progressed over the year. Over the past couple of years, it’s been hinted that the pace of developments in the Ruby world is slowing down, but nothing could have been further from the truth in 2010 (well, except in September..)

Let’s take a spin through the year’s biggest Ruby news!


CoffeeScript Released: A New Language With a Pure Ruby Compiler – If you’re into JavaScript development at all, you must have heard of CoffeeScript. It’s an alternative syntax for JavaScript that compiles down into regular JavaScript that can run anywhere. Read More

By Peter Cooper / December 14, 2010

apple-ruby-3.jpgMacRuby team lead and Apple employee Laurent Sansonetti has unveiled MacRuby 0.8, the latest release of the Ruby 1.9-compatible Mac-focused Ruby implementation. The main MacRuby site hasn’t been updated at the time of writing but you can get MacRuby 0.8 now from the MacRuby files folder or direct at

0.8 follows on swiftly from the MacRuby Bug Smash held on IRC on Saturday 4th December. Given this, 0.8 is primarily a bug fixing release with more compatibility and stability fixes than you could shake a bacon-coated stick at. Some enhancements have been made to MacRuby’s Cocoa development support (a post on the official MacRuby blog is due soon) and macirb now supports auto-indentation and completion. Read More

By Peter Cooper / December 12, 2010

meet-rails-3.png Ruby screencasting supremo Geoffrey Grosenbach has unveiled PeepCode’s new Meet Rails 3 series. There are two parts so far, clocking in at 75 and 92 minutes respectively – they’re $12 each or “free” if you have a PeepCode Unlimited subscription.

Geoffrey has pulled out all of the stops to produce his slickest and best produced screencasts yet. Striking effects abound and he’s perfected the art of producing memorable yet straightforward diagrams to demonstrate the points he makes. This is a great way to get onto the Rails 3 wagon if you haven’t yet tried.

Straight from the horse’s mouth:

He also notes that PeepCode is also selling Jeremy McAnally’s fine “Rails 3 Upgrade Handbook” which we reviewed on Rails Inside a while back. Read More

By Peter Cooper / December 9, 2010

James Golick, a prolific Canadian Rubyist, has declared war on Net:HTTP’s default of not checking the validity of the certificate sent by an HTTP server when making HTTPS requests. His new always_verify_ssl_certificates gem forces Net::HTTP to verify SSL certificates and doesn’t allow other libraries to override this setting.

Despite being a known issue for years, James explains why Net::HTTP’s default setting could be leaving you open to security problems:

While there’s a potential for man-in-the-middle attacks when using Net::HTTP to connect to HTTPS sites, the chances are low, and if you’re not doing anything that needs to be airtight (say, local development work), you might not need to use James’ solution (or if you’re using open_uri). Read More

By Peter Cooper / December 8, 2010

anteater.pngTechCrunch reports that is to acquire the popular Heroku Ruby app hosting service for approximately $212 million in cash. We first posted about Heroku back in November 2007 (18 months before it even went commercial) and since then they’ve gone from strength to strength. Congratulations to the team!

Despite being under embargo with Salesforce on the recent story and being alerted to almost every other Heroku story in the last few years, TechCrunch obviously got an exclusive so read that for the details, read this Hacker News thread for some smart discussion, and read Heroku’s own impressions on what the sale means for them and their customers (in short, Heroku will remain quite independent within the ecosystem and the brand will live on). Read More