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 over 6 years 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
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
31-Jan-08
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
29-Nov-07
35

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

P5.0
06-Feb-08
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
31-Oct-07
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
21-Mar-08
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
11-Feb-08
66
#34875: Book has: Edit the file so that it looks like the following: depot_a/db/migrate/001_create_products.rb Should be: Edit the file so t...more...
P4.0
05-Oct-08
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
23-Mar-08
78

#47301: tablewhose => table whose--Bernd Brägelmann

P5.0
21-Jul-11
80

#32581: you have to edit three files

should read:

you have to edit four files
--Michael Rogers

P5.0
01-Jul-08
80

#46724: SUBJ2--<a href=http://www.autoglass-job.ru>наклейки на автомобиль купить</a>

P5.0
02-Apr-11
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
03-Dec-07
80 71
#29945: == AddPrice: migrating ======================================================== -- add_column(:products, :price, :decimal, {:default=>0, :pre...more...
P4.0
03-Dec-07
B1.02
81
#32539: With my setup (Debian testing, Ruby 1.8, Rails 1.2.3) the truncate helper method returns noMethodError for length. (!) I believe this is an...more...
P5.0
29-Jun-08
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
03-Mar-08
94

#37108: The Play Time URL at the bottom of the page doesn't lead anywhere. (can't include the URL here because of form restrictions)--Matt Pounsett

P5.0
17-Jan-09
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
17-Jan-08
99
#37045: Footnote 2 on p. 99 reads as follows: "Saying :id=>product is idiomatic shorthand for :id=>product.id. Both pass the product's id back to the ...more...
P5.0
14-Jan-09
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
23-Dec-07
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
16-Apr-08
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
06-Oct-07
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
26-Mar-08
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
25-Apr-08
129 116
#32673: The Ajax Magic does not work with the given .rjs file specified. It gives an 'RJS Error'. The code in the .rjs file should be 'page.replace_ht...more...
P5.0
07-Jul-08
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
17-Aug-07
141
#29982: The create script needs to remove the constraints prior to drop_table: class CreatePropagationRecords < ActiveRecord::Migration def self...more...
P5.0
12-Dec-07
152
#33031: Please ignore (or delete) entries #33004 and #33005 below. In the beginning of the tutorial, it shows how to create a 'admin' controller for ...more...
P5.0
11-Jul-08
153

#33004: Line 2 in the listing is referring to a new layout file, but the book text does not describe how to create this file.--Eivind Hagen

P1.00
10-Jul-08
158
#33005: Text refers to file admin_controller.rb but there is no instructions for actually creating this controller. This ties back to the missing "adm...more...
P1.00
10-Jul-08
166 158

#32360: source code doesn't include authorize method code.--Sonia Hamilton

P5.0
11-Jun-08
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
19-Apr-08
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
27-Jan-08
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
06-Dec-07
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
11-Nov-07
B1.02
198
#38017: The set_locale method in application.rb is missing a "/" in assigning the locale_path. locale_path = "#{#LOCALES_DIRECTORY}#{I18n.locale}.y...more...
P5.0
27-Feb-09
209
#37164: The book says "The integration test facility is very nice: we know of no other framework that offers built-in testing at this high of a level....more...
P5.0
20-Jan-09
213
#37773: The line "xml_http_request "/store/add_to_cart", :id => ruby_book.id " differs from actual code: " xml_http_request :put, "/store/add_to_cart...more...
P5.0
16-Feb-09
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
27-Dec-07
222

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

P5.0
18-Dec-07
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
06-Nov-07
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
18-Aug-07
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
17-Sep-07
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
12-Mar-08
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
14-Feb-08
283
#29864: Suggestion: On code in the bottom of the page change line: require_gem "activerecord" to require 'active_record' Details:...more...
P5.0
10-Nov-07
283

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

P2.0
12-Nov-07
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
06-Oct-07
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
28-Apr-08
303

#32024: As a Rails n00b, it would be good to know WHY the first example on the page is "incredibly bad Rails code".--Jared Robertson

P5.0
16-May-08
319

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

P5.0
09-Nov-07
333
#32017: Follow up to the fix to the :finder_sql statement -- the text should also be clarified. "you can create a collection of all the line items for...more...
P5.0
15-May-08
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
29-Feb-08
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
29-Feb-08
353
#34531: When doing self-referential joins, the :foreign_key of the has_many should refer to the primary key id field of the table. For example, ' has_...more...
P5.0
18-Sep-08
353
#34545: A correction to the previous correction :-) If we had: class Employee < ActiveRecord::Base self.primary_key = "employee_id" then t...more...
B1.11
18-Sep-08
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
29-Feb-08
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
26-Oct-07
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
04-Dec-07
411

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

P5.0
21-Mar-08
421

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

P1.00
14-Nov-07
438
#37965: The word "to-level" should be "top-level" in the sentence "Every new Rails application... a declaration such as the following is added to the ...more...
P5.0
25-Feb-09
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
03-Mar-08
442

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

P5.0
17-Jan-08
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
01-Mar-08
459
#36327: At the bottom of the page, the text says to put sweeper code into app/sweepers. This is incorrect; unless you configure your rails app otherwi...more...
P5.0
06-Dec-08
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
10-Nov-07
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
29-Nov-07
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
02-Mar-08
492

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

P2.0
02-Mar-08
498

#35977: In gray box "Forms Containing Collections", should the call on line 3 of the code be text_field() or text_field_tag()?

P5.0
19-Nov-08
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
17-Feb-08
506

#37923: Footnote 11 should say "in place of" rather than "in place for".--Alan Frankel

P5.0
24-Feb-09
525
#37957: The last instance of the word "in" should be changed to "it" in "It turns out that in our example code... so rather than including it on every...more...
P5.0
25-Feb-09
526

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

P5.0
28-Nov-07
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
12-Jan-08
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
07-Oct-07
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
03-Mar-08
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
14-Nov-07
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
01-Nov-07
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
07-Oct-07
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
14-Nov-07
549

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

P1.00
14-Nov-07
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
17-Sep-07
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
14-Nov-07
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
05-Mar-08
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
11-Jan-08
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
15-Jan-08
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
13-Jan-08
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
24-Aug-07
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
27-Nov-07
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
27-Sep-07
635

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

P5.0
18-Mar-08
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
03-Oct-07

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
23-Nov-06
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
02-Jul-07
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
24-Dec-06
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
12-Dec-07
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
21-Sep-07
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
19-Nov-06
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
10-Sep-07
388

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

B1.12
03-Oct-06
388

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

B1.12
03-Oct-06
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
29-Aug-07
613

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

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

P5.0
01-Dec-07
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
10-Aug-07
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
06-Jul-07
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
19-Nov-06
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
21-Jun-06