Logo b LEARN ENOUGH
Archive RSS Email
RECENT POSTS

Rails 2.3.6 addendum

May 23, 2010 • posted by Michael Hartl

It looks like I was a bit hasty in declaring my Rails 2.3.6 tutorial test suite green. One test actually fails, the integration test for user signup, which includes a test for the success flash notice using response.should have_tag("div.flash.success"). This code, introduced in Listing 8.22 and included again incidentally as part of Listing 11.41, can be fixed simply by removing (or commenting out) the offending line. (Of course, the tutorial has been updated accordingly.)

To be clear, the application code still works fine; it's just the test that breaks, and there's nothing to be done (short of patching Rails) other than just axing the line. If you find this "solution" unsatisfying, that makes two of us. Unfortunately, minor Rails point releases sometimes break little things like this—indeed, the 2.3.4 to 2.3.5 upgrade broke a similar flash test in a client project, and the test is currently commented out with the note "Rails 2.3.5 broke this." Luckily, this particular test isn't all that important, but it is irritating nonetheless. Unfortunately, this is the price we pay for living on the bleeding edge…

Michael-hartl
Michael Hartl

I’m Michael Hartl—author, educator, and entrepreneur. I’m probably best known as the creator of the Ruby on Rails Tutorial, a book and screencast series that together constitute one of the leading introductions to web development. Once called his “favorite book” by Wikipedia founder Jimmy Wales, the Ruby on Rails Tutorial currently has over 150 5-star reviews at Amazon. I’m also (in)famous for creating Tau Day and The Tau Manifesto, which have inspired an international movement dedicated to the proposition that “pi is wrong.” (For example, as a result of The Tau Manifesto, MIT releases their admissions decisions each year at “Tau Time” (6:28 p.m.), and typing tau/2 at Google yields 3.14159…) Finally, I’m a founder of Softcover, a publishing system and sales platform for technical authors, which among other things powers both The Tau Manifesto and the Ruby on Rails Tutorial.

I’m a graduate of Harvard College and have a Ph.D. in Physics from Caltech, where I studied black hole dynamics and was an award-winning instructor in theoretical and computational physics. I’m also an alumnus of Y Combinator, the entrepreneur program that has produced companies such as Dropbox and Airbnb. (Alas, my own Y Combinator startup was neither Dropbox nor Airbnb.)