We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

The latest version of the book is P5.0, released 6 months ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
Hello Hello

#31385: Sorry, but what is mariburjeka?

Jane.--Unknown

B1.06
35

#30732: The link to James Duncan Davidson's write up on using MacPorts isn't valid any more—returns a 404 error.--Ben Cohen

P5.0
35
#30652: Now that Rails 2 is out, you might want to add a note on how to install the Rails 1.x version, so that the examples work. eg on Ubuntu (insta...more...
P5.0
35

#29937: The link to Duncan's OSX install write-up appears to be broken. It does, however, lead to a nice picture of his alpine mountaineering.--Dave Peck

P5.0
35

#30706: New description of Mac OS X install at:
hivelogic.com/articles/ruby-rails-mongrel-mysql-osx/--Chris Baker

P5.0
50 65

#31498: Fig 5.2 not showing up--Chris Bunch

P5.0
54
#29811: We can update Rails for each project with the 'gem update rails --include-dependencies' command. 'gem cleanup' then removes the old version. ...more...
P4.0
59
#31412: Rails 2 by default use sqlite instead of MySQL. If you want to create the rails application using MySQLas discussed in the book, it should be ...more...
P5.0
60
#30734: Middle of the page says "...you can skip forward to Section 6.1.." But I am in section 6.1 ... I think it means to say, skip the database conf...more...
P5.0
67

#31753: undefined method `scaffold' for AdminController:Class
I get this error, How do I fix it?--Rohan Corea

P5.0
67
#31429: undefined method `scaffold' for AdminController:Class I'm using a newer version of rails, than that used in the book. I'm sure that this is...more...
P5.0
77

#31829: the scaffold method seems to have been deprecated. I am using latest rails on ubuntu. Is there an update to the book?--st

P5.0
80
#31901: What if running Rails 2.0.2 ... using the code downloaded from the book's site ... and: rake aborted! beacouse a nil and whatever... Dave... d...more...
P2.0
80
#29943: the download snippet, in the middle of the page, is shown as: depot_b/app/views/layouts/admin.rhtml it should be, in order to get the ...more...
P5.0
80 71
#29945: == AddPrice: migrating ======================================================== -- add_column(:products, :price, :decimal, {:default=>0, :pre...more...
P4.0 B1.02
90
#31247: The example, if you receive nil on line 4, specifically ... ActionView::TemplateError (You have a nil object when you didn't expect it! Yo...more...
P5.0
93
#31113: The second bullet point in the playtime section on this page asks the reader to make the image into a link that adds the book to the cart. How...more...
P2.01
96
#30506: * I am a newbie, so this might be wrong. I just would like to report it and confirm whether my point is right or not in the code snippet o...more...
P2.0
101
#30152: The listing for "depot_q/app/views/login/list_users.rhtml" omits the <div> tags that should enclose the snippet. The "List users" link in Ite...more...
P4.0
111
#31677: hello, i think that the logic of Total price in Shopping Cart is wrong. You have it wrong on the picture on same page too: Total price shou...more...
P2.0
117
#29752: even with these changes if you manually enter an invalid product id url where the product id starts with a valid id (e.g. ...add_to_cart/4ffff...more...
P4.0
121
#31477: The first time javascript works (with ONE line?!? of code), we sort of hove to take your word for it. After all, reloading the index is likely...more...
P1.00
124
#31731: The highlight function does not work when adding the first of a product type to the cart. I.E. 'Book A' has no entry in the cart. When I click...more...
P5.0
130
#29439: if you are having problems with the AJAX, make sure you are clicking the button and not the hyperlinked image (made via a link_to in a previou...more...
P4.0
141
#29982: The create script needs to remove the constraints prior to drop_table: class CreatePropagationRecords < ActiveRecord::Migration def self...more...
P5.0
172
#31684: Book reads "(In fact, this code still has a potential timing issue—it is still possible for two administrators each to delete the last two use...more...
P5.0
180
#30584: The test will not run correctly because a number of fields in the 'line_items' table are defined to be NOT NULL. Therefore the default fixture...more...
P4.0
181
#29948: The file listed in the snippet 'depot_r/test/unit/product_test.rb' needs the portion starting from 'def test_positive_price' to second 'end' a...more...
P2.0
193
#29867: At the bottom of the page We'll call the user "dave." should read We'll call the user "dave". The dot and quotation mark are swapp...more...
P2.0 B1.02
215
#30259: Running user_stories_test.rb, as supplied gives me: NoMethodError: undefined method `[]' for :put:Symbol Changing :put to 'put' results ...more...
P5.0
222

#30040: depot/test/performance/order_speed_test.rb: DAVES_DETAILS is missing.--Richard A Noble

P5.0
265
#29837: "Anatomy of a Migration" Migration file names must match migration class names. If they don't match, the error shown is 'uninitialized consta...more...
P4.0
267

#29448: Hi!

You should include ":interval" type... it seems to be supported as a data type on migrations. I just used it in one of my projects.

P2.01
268
#29670: The footnote states, "simply make it a datetime and name it created_at", but the majority of the book has "timestamp" -- do a search on "creat...more...
P4.0
273
#31229: Well, I'm using Rails 2.0, so this may be what has the error rather than your book, but I'll lay the whole thing out. When I execute the "rub...more...
P2.0
274

#30753: Rather than suggesting that join tables don't need primary keys, you might suggest that they use the FK fields together as a composite PK.--Roy Pardee

P5.0
283
#29864: Suggestion: On code in the bottom of the page change line: require_gem "activerecord" to require 'active_record' Details:...more...
P5.0
283

#29875: The link to the subversion repository for annotate_models is not valid anymore.
--Joakim

P2.0
291

#29753: The name of the driver and adapter has been changed to ibm_db since now the same driver/adapter can be used with both Informix and DB2 databases--Manas Dadarkar

P4.0
293
#31789: Regarding the Oracle adapter: it's perhaps worth a footnote that Oracle itself behaves very differently from standard SQL with regard to empty...more...
P5.0
319

#29861: def last_five
@list.join(',' )
end
Is the method name list instead?--Nasir Khan

P5.0
333
#31068: Your finder_sql returns all rails line items (whether or not associated with your order) I suggest you change to : :finder_sql => "select l....more...
P5.0
333
#31069: Precision to my previous recommandation : make sure the #{id} is between single quotes, otherwise it will be interpolated to early given a wro...more...
P5.0
359

#31079: Last sentence of before section 18.7: "... and add the column catgories_count to your table." -> missing e in cat*e*gories_count.--Irfan Adilovic

P2.0
368
#29794: The documentation for validates_format_of says that it has an ':allow_nil' option, but this doesn't seem to be the case (it isn't mentioned in...more...
P4.0
393
#29946: Near the bottom of the PDF pages, the "default" routes.rb file is described. There appears to be a line of ruby missing: map.connect ':c...more...
P5.0
411

#31420: The 'scaffold_resource' generator is no longer valid. The standard 'scaffold' generator will now do the same job.--Navin Samuel

P5.0
421

#29883: It says, "The default parameter is unused." I think it's the "defaults" parameter.--Shannon -jj Behrens

P1.00
439

#31108: "... a declaration such as the following is added to the to-level application controller..." "to-level" should be "top-level" --Kiyu Gabriel

P5.0
442

#30504: In the middle of the page the "particular controller" RssController will unlikely subclass ActionController::Base but ApplicationController.

P5.0
455
#31096: Explanation of the :method parameter to "verify": "The request method (:get, :post, :head, or :delete) must match one of the given symbols." I...more...
P2.0
461
#29865: Minor error in the Time-Based Expiry of Cached Pages section. A sentence reads in part: the page cache file for content/show/1 will be in ...more...
P4.0
474
#29936: In Rails 1.2.6, I noted the following differences regarding TextHelper functions: truncate() takes a 4th optionnal argument: truncate_strin...more...
P5.0
483

#31105: First sentence of 22.5: "A form that wraps a single Active Record module...", should probably be "model" instead of "module".--Irfan Adilovic

P2.0
492

#31106: Second paragraph, last line: ancilliary -> ancillary--Irfan Adilovic

P2.0
503

#30913: In order to retrieve the uploaded_picture name you call "picture_field.original_filename" but original_filename is not defined for Picture.--Sig

P5.0
526

#29934: For "conditions_by_like" if would be useful to have a note about the side bar.--Dale Thatcher

P5.0
526
#30456: Paging is broken if you utilize the search. Results come back fine initially, however when you page next or select a different page (while us...more...
P5.0
534
#29756: in the example given for "periodically_call_remote" the third line is a condition where .innerHTML == "Unknown" which will cause this supposed...more...
P4.0
535
#31114: Though identical to the link_to_remote example two pages before, the periodically_call_remote example on this page is not specifically meaning...more...
P2.0
537
#29878: At the bottom of the page, the code says, "<%= submit_to_remote 'Send Email', 'send'..." Those parameters are reversed. In fact, on the next...more...
P1.0
543
#29817: The code presented in this page 'auto_complete_demo.rhtml' does work in Safari, but not in Mozilla based browser like FireFox or Camino. Addit...more...
P4.0
545
#29758: under "auto_complete_field options", in about the 2rd paragraph down, it says something about overriding the default server endpoint. this is...more...
P4.0
546
#29879: At the bottom of the page, it says, "as an HTML snippet containing just <li> elements." However, on the next page, the file "progforms/app/vi...more...
P1.00
549

#29880: It says "Figure 23.5: DRAG-AND-=DROP TO-DO LISTS". I think the "=" is a typo ;)--Shannon -jj Behrens

P1.00
555

#29673: Within the inplace_demo.rhtml, the function 'user_columns' requires the relevance_extensions plugin; some mention of this dependency might be helpful--Gary Fleshman

P4.0
557

#29882: At the top of the page, it says "[No Value]", but if you look at the image on the bottom of p. 556, it says "[No Name]".--Shannon -jj Behrens

P1.00
568
#31141: The example configuration for smtp server should be: config.action_mailer.smtp_settings = { ... rather than config.action_mailer.server_s...more...
P5.0
610
#30444: I would suggest mentioning that in some circumstances the ssl_requirement plug-in will not be sufficient for security. e.g. if used for a 'lo...more...
P5.0
620
#30476: I found this section quite helpful in deploying my app, however in my case it didn't work using the recipe you gave. In Step Five on page 620...more...
P5.0
621
#30465: # On the server(s) and your client (if not already installed) $ sudo gem install --include-dependencies ‘ $ sudo gem install --include-dep...more...
P5.0
623

#29569: When setting up the deployment machine, the text says to install termios twice, once from MacPorts, and a second time from gem install.

P1.00
623
#29928: Re Capistrano 2.0. Could an update include Dave's comment, so that one doesn't spend a lot of time trying to make something work that isn't g...more...
P5.0
628
#29705: When rotating log files, it suggests that you "first copy the contents of the current log to a different file and then truncate it." This see...more...
P1.0
635

#31303: In line -6 "convenience" should be "convenient"--Matthew Cargo

P5.0
709
#29745: In the index, Single Table Inheritance is listed as "Single-Table Inheritance", but in 2 other index entries, you're saying "see Single Table ...more...
P4.0

Stuff To Be Considered in the Next Edition

PDF Paper Description Found in Fixed in
1
#26647: i would suggest to dedicate some pages to postgresql, which is by the way a fully SQL99 compliant database system (which mysql isnt.) -- postg...more...
P1.00
25
#29298: There is now a binary distribution for Linux called LinRails located at linrails.thembid.com that includes all the necessary tools to get sta...more...
P2.01
71
#26777: Got message trying to do rake db:migrate, saying "no such file /tmp/mysql.sock". Found fix on web, saying, change database.yml host from loca...more...
P1.00
76
#29980: It seems the scaffold :product does not work in Rails 2.0. A note or guidance for the equivalent would be very helpful. (Dave says: Rails ...more...
P5.0 B1.02
89
#29691: The doctype declaration on page 89 is incorrect. The first 2 lines must be followed by the tag that says: (I had to replace the http with hxxp...more...
P4.0
218
#26609: The Integration Testing Support section opens with a description of the session object and a list of its attributes. It would be more instruct...more...
P1.0
356
#29643: Trying to use the acts_as_list function, I have problems figuring out how to insert an item at a certain position in the list. I have found o...more...
P4.0
388

#26066: Would be nice to see a file upload example in rest.--maintheme

B1.12
388

#26067: Would be nice to get some information about the cache module + rest.--maintheme

B1.12
478

#29602: Now (with the next rails 2.0 in mind) it is better to use the rails will_paginate plugin to do pagination in rails. It is much powerful.--Skyblaze

P4.0
613

#29938: you shoud update the book with new capistrano 2

(Dave says: this would be a new edition)--Skyblaze

P5.0 B1.02
623
#29395: With Capistrano 2.0 out, it appears that the line "cap --apply-to /local/project/path [applicationname]" is out of date, perhaps it should jus...more...
P4.0
687
#29308: AR::Base#quote ( #quote_value in Edge/2.0) not listed in index. Should be either listed under "q" or under "Active Record" entries (Dave...more...
P2.01
700
#26613: "Legacy schema: see Database" in Index. This deserves a unified discussion of basic issues like set_primary_key, set_table_name, AR:Base.plur...more...
P1.0
999
#25312: I've been using the code found here: http://media.pragprog.com/titles/rails2/code/rails-code.tgz and I don't see any documentation comments in...more...
B1.04