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 P6.0, released almost 8 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
hpcXE tYVhL

#47654: iLhIjY web20power.txt;1;1--JiueKXnZGiTq

P6.0
28-Sep-11
i i
#23216: Dave says: For general help with Rails and examples in the book, I recommend the Rails mailing list at http://lists.rubyonrails.org/mailman/li...more...
P2.0
25-Aug-05
1
#24344: You should put together a comprehensive list of all the naming conventions in one place. "id" is in the begining of the book, datetime on pag...more...
P4.0
21-Mar-06
2rand 2rand

#47533: +z$8frZdyL%68pSU/:>w<:E3.lG-!XIB--zyqMdVsbiEOwzNQ

P6.0
10-Sep-11
5
#24234: Currently, all downloadable code linked from the PDF book has the Content-Type set to "text/html". This will make most browsers show the code ...more...
P4.0
03-Mar-06
5

#24514: "In the margin, you--jeff e

P4.0
21-Apr-06
6
#24088: "This book documents Rails V1.0, which became available in mid 2005" should be "This book documents Rails 1.0, which became available on Decem...more...
P4.0
08-Feb-06
15
#24522: "Sometimes these class-level methods return collections of objects. Order.find(:all, :conditions => "name='dave'") do |order|  puts order.a...more...
P4.0
23-Apr-06
20
#25308: Well one drop for the general context... I must confess I haven't bought that book yet, I'm just testing it. It's my first contact with Rails...more...
P4.0
21-Jun-06
23

#25285: In the fifth printing of the book, the link to Lucas Carlson's instructions for Ruby on Mac OS X Tiger leads to an error page.--Jeffrey Yu

P4.0
17-Jun-06
33
#24403: The "Making Development Easier" box is very valuable information, but I question whether this is the best place to put it. I would have rathe...more...
P4.0
03-Apr-06
50
#24405: I am going through the tutorial with you: After "rails depot" and then "cd depot" and then "ls" my directories are different from yours. For ...more...
P4.0
03-Apr-06
50
#24533: The code at the bottom of the page is unclear. What should one do with it? Type it at an 'mysql' prompt? If so, the result is an error (104...more...
P4.0
26-Apr-06
50
#25309: I'm using MYSQL 5.0.22 the current last stable version on windows XP SP2. It's my first enccounter with MYSQL so my problems could be related ...more...
P4.0
21-Jun-06
51

#23994: you might want to add "-u dave" to the mysql statement--Chad Bearden

P4.0
26-Jan-06
51

#24534: When one types the following string (mysql depot_development <db/create.sql), the result is an ->. What then? This entire section is unclear.

P4.0
26-Apr-06
52
#24116: It seems that the rails script now adds the application to database.yml: database: depot_development It automatically replaces the rails...more...
P4.0
12-Feb-06
52
#24409: Not sure if you mention this later or not, but for Windows there needs to be: port: 3306 in the file. And for Linux there needs to be, ...more...
P4.0
04-Apr-06
52
#25310: Depot_xxxx are already correctly set in database.yml. But as you said after, I advise to put 'dave' as username in development and test. The ...more...
P4.0
21-Jun-06
53
#24500: Repeated reinstallations of entire package on OSX 10.4.6 continually produce the following: ./script/../config/../config/environment.rb:8: ...more...
P4.0
19-Apr-06
53
#24510: for, depot> ruby script/generate scaffold Product Admin I had to use infor from http://dev.rubyonrails.org/ticket/200 to get it to work...more...
P4.0
21-Apr-06
53
#24532: When attempting to run the line "ruby script/generate scaffold Products Admin" in Windows, I receive the following error listed in the book (a...more...
P4.0
26-Apr-06
53
#24556: On OS X (10.4.3), when I attempt to run script/generate scaffold Product Admin, I get the following error: You have a nil object when you d...more...
P4.0
30-Apr-06
54
#24212: While creating the databases, the user should issue the command: mysql> grant all on depot_development.* to 'dave'@'localhost'; There is n...more...
P4.0
28-Feb-06
54
#24283: After setting database privileges, if you exit mysql without typing the magic words "flush privileges", the privileges you've just set won't t...more...
P4.0
11-Mar-06
57
#26704: ppc:~/work/depot tomcoady$ ruby script/generate scaffold Product Admin ./script/../config/boot.rb:18:in `require': No such file to load -- ru...more...
P1.0
03-Dec-06
57

#26705: Solution to my tech error:
ppc:~/src/rubygems-0.8.11 tomcoady$ sudo ruby setup.rb
ppc:~/work/depot tomcoady$ sudo gem install -v=1.1.6 rails
--Tom Coady

P1.0
03-Dec-06
57
#25428: After running "ruby script/generate scaffold Product Admin" on linux box using SuSE v10.0 and MySql Ver 14.12 Distrib 5.0.22, I get an error s...more...
P4.0
09-Jul-06
57
#23940: The 'gotcha' notes (3,4,& 5) are useful. You might consider adding another... If you get Routing Error: Recognition failed for '/admin', ...more...
P3.0
12-Jan-06
57
#26760: I think the code should read ruby script/generate scaffold Products Admin since the table was created with the name products (plural, not ...more...
P6.0
16-Dec-06
57
#31649: My version of the paper book is actually P5 (2006-02-16). The problem is that scaffold has changed. I am running Rails 2.02 and the following ...more...
P4.0
11-Apr-08
57
#26821: Okay, so this is a gripe. As noted previously, the link to Lucas Carlson's fix is no longer to be found as described. However, you can go to t...more...
P6.0
09-Jan-07
57
#24784: I've seen this error elsewhere but never a solution. Here goes: On page 57, I entered, at depot prompt, ruby script/generate scaffold Produc...more...
P4.0
08-May-06
62
#24333: The unless clause of the validate method is wrong. To verify this, comment out 'validates_numericality_of :price' and try submitting a produc...more...
P4.0
19-Mar-06
62
#25300: In the eBook we have this code for product.rb: errors.add(:price, "should be positive") unless price.nil? || price >= 0.01 Where as the down...more...
P4.0
21-Jun-06
62

#25301: Quote from second paragraph:
"Note that we only do the check if the price has
been set. Without that extra test we--Max

P4.0
21-Jun-06
62
#29155: Just a note for readers who may get put-off by the unknowability's of generated code-bases early on. Should a user make an error in pluralisa...more...
P6.0
28-May-07
63 63
#24557: Cannot "destroy" items. Both file listings 66 & 67 omit ':post' argument in the link_to 'Destroy' line. The line should read: <%= link_t...more...
P4.0
30-Apr-06
64

#24397: Link to ERb definition is not on page 31 as stated.--Pierre-Loïc Raynaud

P4.0
01-Apr-06
64
#25764: It took me quite some time when I was working through the sample code to figure out what was wrong. When editing the list.rhtml, I just erase...more...
P6.0
21-Aug-06
65

#25475: ITERATION A4

P4.0
18-Jul-06
65
#24254: Relative URL's not allowed by current validates_format_of :with parameter; where the text says: "Put some images in the public/images director...more...
P4.0
08-Mar-06
65

#25311: ":post => true" is missing after :confirm => "are you sure?".
Without this you cannot destroy anything :)

Feedback to Kagejin0@yahoo.fr --Koguma

P4.0
21-Jun-06
69
#25734: The list action for Destroy as it is in the book didn't work for me: Clicking Destroy would pop up the confirmation dialog, but choosing ok wo...more...
P6.0
17-Aug-06
69
#24228: The text starting: 'put some images in the public/images directory' led me to think that the correct url for the images in the production form...more...
P4.0
03-Mar-06
69
#24313: The images do not display when added in relative format. In the list.rhtml file you should use <img width="100" height="80" src="/depot/ima...more...
P4.0
17-Mar-06
71

#24420: We’ll also take this opportunity to tidy up the index.rhtml view in app/views.

it should be: app/views/store--kibo

P4.0
07-Apr-06
71
#23965: This is the first time depot.css is mentioned. It has to be included in the project for proper view display. Needs to be copied from the sam...more...
P4.0
18-Jan-06
71

#26291: I'd rather remove the line numbers from listing of layout store.rhtml. With line numbers this sample is uncomfortable to copy/paste.

P6.0
18-Oct-06
73
#26711: The suggested code does not work for me but I found the right code elsewhere in the code bundle - detail here to avoid unititiated Product: ht...more...
P1.0
04-Dec-06
76
#24091: As was previously stated, " In the implementaion of find_cart, the 3rd line reads "session[:cart] ||=Cart.new" This line should read "@cart = ...more...
P4.0
09-Feb-06
76

#24888: At first sight this approach to database maintenance is
attractive--Gordon Thiesfeld

P4.0
17-May-06
76
#25164: As pointed out before, there is an error in session[:cart] ||= Cart.new I replaced the code with session[@cart] ||= Cart.new and it magi...more...
P4.0
03-Jun-06
79

#23187: The hyperlink to page 474 that describes the << operator points to page 473.--Stephen Touset

P2.0
20-Aug-05
80
#25862: I made all the additions to the code to the end of making the cart I get the rails error: "You have a nil object when you didn't expect...more...
P6.0
07-Sep-06
81
#24329: IWhen I run the sql at the bottom of the page to create the new table, I get an error "ERROR 1005 at line 13: Can't create table '.\depot_deve...more...
P3.1
18-Mar-06
81
#25904: similar to the error already reported... ERROR 1064 (42000) at line 12: You have an error in your SQL syntax; check the manual that corresp...more...
P1.0
12-Sep-06
81

#25318: items.sizes is nil !!!

P4.0
22-Jun-06
82
#24395: Others have mentioned this error and I've tried all their suggestions but I can't get any to work. Upon testing the cart to see if it will ret...more...
P4.0
31-Mar-06
83
#24335: find: Using the model declaration forces Rails to load the user model class early, replace with: Using the model declaration forces Rails...more...
P4.0
20-Mar-06
84
#24393: The online version of the file for '...app/models/cart.rb' (http://media.pragprog.com/titles/rails/code/depot9/app/models/cart.rb) differs in ...more...
P4.0
30-Mar-06
85
#23910: The display_cart method on this page must be placed in the store controller *before* the private declaration line that's already in that class...more...
P3.1
02-Jan-06
85
#24422: In reference to problem #2532, "You have a nil object when you didn't expect it!", I also ran into the problem in chapter 8. I typoed a simpl...more...
P2.0
07-Apr-06
85
#26229: When looking at "depot/public/store/display_cart" with my browser I was getting the error: undefined local variable or method `find_cart' f...more...
P3.0
12-Oct-06
85
#24256: Re #2532 - This also happend to me running under Webrick. The solution was to both close the browser and restart Webrick. Hope this helps th...more...
P1.0
09-Mar-06
86
#29669: Concerning the invalid IDs of objects in the URL line: it is not certain that an exception will always be thrown. I assume that the ID field, ...more...
P1.0
16-Sep-07
87
#24448: In regard to the common error "NoMethodError in Store#display_cart Showing app/views/store/display_cart.rhtml where line #5 raised: You...more...
P4.0
12-Apr-06
88

#24296: Editing cart.rb in order to enable the quantity to increment requires a WebTrick restart to work properly.--Bob Clewell

P2.0
15-Mar-06
90
#24288: The file link beside "<% @page_title = "Your Pragmatic Cart" -%>" is File 29. File 29 contains the fmt_dollars() helper. fmt_dollars() isn't d...more...
P4.0
13-Mar-06
96
#24860: Unable to create the session table. C:\apps\ruby\files\work\depot>rake --trace db:session:create (in C:/apps/ruby/files/work/depot) rake ...more...
P4.0
15-May-06
96
#25138: Flash messages are not displaying correctly using IE 6 sp2. Results of invalid add_to_cart, empty_cart, etc no flash message appears to dis...more...
P3.0
31-May-06
98
#23580: using the fmt_dollars(item.unit_price) method, values less than 1, (values < 1) on the display_cart details show up as 0.00 but get added corr...more...
P2.0
22-Nov-05
98

#24003: render_partial "form"
is now
render :partial => "form"--Dave Myron

P4.0
31-Jan-06
98
#50174: Destroy link does still not work, even if <%= link_to 'Destroy', { :action => 'destroy', :id => product }, :confirm => "Are you sure?", ...more...
P6.0
17-Nov-12
99

#25348: In "Putting Session in the Database", theres an extra "that." in the first paragraph (First, we--Jose Guerra

P4.0
27-Jun-06
99
#24239: Since file names can contain dashes (-) in them, it never struck me that check-out.rhtml was actually checkout.rhtml until I went to test the ...more...
P4.0
06-Mar-06
101
#26216: @order.line_items << @cart.items has to be @order.LineItems << @cart.items otherwise, ruby will report an unknown method "line_items" for the ...more...
B1.0
10-Oct-06
103

#26369: 103 describes nirvana as a state of being, but it is really a state of not-being.--William Henderson

P6.0
24-Oct-06
103

#25340: Not filling the 4 fields is will highlight them correctly, but there is no message as shown on the screen copy.--koguma

P4.0
26-Jun-06
105
#23872: When I write code as in file 36: options = [["select a payment option", ""]] + Order::PAYMENT_TYPES select( "order", "pay_type", options) ...more...
P3.0
21-Dec-05
105
#24216: The file name checkout.rhtml is hyphenated to check-out.rhtm in paragraph 3. This is the only reference to the file name on the page where the...more...
P4.0
28-Feb-06
108
#24213: The code in checkout.rhtml that displays the error message is given as: <%= error_messages_for(:order) %> This works fine if there is an...more...
P4.0
28-Feb-06
108
#24215: The problem with "error_message_for(:order)" occurs if you have named the page check-out.rhtml as given on page 105. If you correct the page n...more...
P4.0
28-Feb-06
109
#23894: Adding the scaffold stylesheet to the store layout seems to disable any formatting from the depot stylesheet. It doesn't seem to matter which...more...
P4.0
30-Dec-05
109
#24473: #2855: The test "Just as with the administration validation, we need to add the scaffold.css styolesheet to our store layout file to get decen...more...
P4.0
13-Apr-06
109
#24289: There is an issue with the cascading style sheets being used here. The problem is that both the scaffold and depot stylesheets are combining t...more...
P2.0
13-Mar-06
115

#24141: "and a slightly different interaction style to the one we've been using so far." -> "... interaction style than the one we've been using so far."--Justin Johnson

P2.0
16-Feb-06
116
#26928: This may be a simple erratum. In the 7th row of the code, where in the function of ship, the "#{count_text} marked as shipped" should be "has ...more...
P6.0
01-Feb-07
116
#23947: The code given for the ship method should not include the check (if count > 0) if you want to be able to show the intended message "No orders ...more...
P4.0
16-Jan-06
119

#24334: The admin.css file is not included in the code download, so we need to type this in manually :(--Nick Coyne

P3.1
19-Mar-06
119
#24472: The test "Just as with the administration validation, we need to add the scaffold.css styolesheet to our store layout file to get decent forma...more...
P4.0
13-Apr-06
120
#24162: The code snippet given for login_controller.rb is missing an "end" statement at the end of it to close : class LoginController < Applicatio...more...
P4.0
21-Feb-06
122
#26252: The ship method only calls the pluralize method if the count is greater than 1: def ship count = 0 if things_to_ship = params[:to...more...
P3.0
14-Oct-06
122

#24217: The Login controller's "Add User" picture is incorrect. It has the stylesheet applied and looks much fancier.--Miles K. Forrest

P4.0
28-Feb-06
122

#24518: in File 48 (listed on page 122) -- the Pluralize method returns an error of 'undefined method' for 'pluralize'

P4.0
22-Apr-06
126
#22678: "Have a look at the source of the controller on page 478 and of the view on page 486." The link to page 478 goes to page 475, and the link ...more...
B1.0
04-Jun-05
126

#24218: Link to page 490 actually goes to 487, and 498 goes to 495--Miles K. Forrest

P4.0
28-Feb-06
130

#26190: Whenever I try to add the initial user I am just forwarded to login/login. Is there another way just to add 1 user?--Sean

P6.0
08-Oct-06
134
#24131: The delete_user action uses a symbol reference for the redirection: redirect_to(:action => :list_users) While this obviously works it is a l...more...
P3.0
14-Feb-06
134
#24004: It seems that the generator for unit tests no longer generates the setup method (Rails 1.0.0) so the code in the PDF/Book doesn't match watch ...more...
P4.0
31-Jan-06
138
#24246: the "assert_equal 29.95, @product.price" fails for me, even though product.price is 29.95. The only way to make this assert to pass it was ch...more...
P4.0
07-Mar-06
139
#24182: You might want to make mention of looking at the code for this test section. You tend to be very brief in your explanation and tend to leave ...more...
P4.0
22-Feb-06
140
#24315: Following the book, the create.sql creates MyISAM tables in MySQL by default. To change these later, use: ALTER TABLE depot_test.products E...more...
P4.0
17-Mar-06
141
#24340: Maybe it helps someone: here is the correct code for test_read_with_fixture_variable: def test_read_with_fixture_variable assert_kind_...more...
P4.0
21-Mar-06
141

#24444: If you are getting the error about @products being nil then set use_instantiated_fixtures = true in test/test_helper.rb.--Luca Spiller

P4.0
11-Apr-06
141 68
#23938: As a side bar it would have been nice to have been warned about strftime and how our database with empty or default 0000-00-00 00:00:00 values...more...
P1.0
11-Jan-06
141
#24295: New to RoR, so this might be the same as the erratum beginning "With the new testing rules, a good chunk ". In the test_read_with_hash method...more...
P4.0
14-Mar-06
142
#23879: Figure 12.1 suggests the members of the @products hash are Product objects coming from the database, as @version_control_book is. This is misl...more...
P3.1
24-Dec-05
143
#23850: If you make a mistake in the yaml for the entry @future_proof_book, you won't be told if it doesn't exist and it will silently pass as it reso...more...
P3.1
15-Dec-05
144

#24142: "... then paying his valid credit card..." -> "... then paying with his valid credit card ..."--Justin Johnson

P2.0
16-Feb-06
146
#24005: test_helper.rb looks (mostly) nothing like the example in the PDF. It now looks like: ENV["RAILS_ENV"] = "test" require File.expand_pat...more...
P4.0
31-Jan-06
147
#23885: test_helper.rb must be updated in order for the test_destroy method to be used if the MySQL database is using MyISAM tables (the default for C...more...
P3.0
27-Dec-05
148
#23887: Rails has recently, in 1.0, updated the way it handles fixtures. If you're having problems, see Mike Clark's weblog here: http://clarkware.co...more...
P3.0
28-Dec-05
148
#24022: The @products and @version_control_book instance variables are not available unless you set the 'use_instantiated_fixtures' attribute to true....more...
P3.0
03-Feb-06
148
#24561: when running test_read_with_hash omitting the before_type_cast suffix to the date assertion seems to allow the test to pass - including it cau...more...
P4.0
01-May-06
151
#23261: Maybe I'm not quite understanding what Mike is saying (in the context of using a dynamic fixture to 'future-proof' the test of salable_items)....more...
P1.0
27-Sep-05
152
#28629: in your tests, you are testing the equality of ambiguous numbers (floats). The prices you chose for the fixtures just _happen_ to work, but ot...more...
P3.0
19-Apr-07
156 - 159
#24080: The file examples for store_controller.rb thoughout this section contain arguments to the fixture() method that look like this. fixtures :pro...more...
P4.0
07-Feb-06
156
#24441: Book Version 2005-12-20. Running "ruby test/functional/login_controller_test.rb" produces error: "method 'before_destroy' for LoginController...more...
P4.0
11-Apr-06
159
#24197: This may be a Ruby/Rails version problem (Ruby 1.8.2, Rails 1.0.0). The session array is problematic. I see examples with it as a global var...more...
P3.0
25-Feb-06
166
#27028: The listing of application.rb is inaccurate. It should include the following lines just after the class declaration: # Pick a unique coo...more...
P4.0
23-Feb-07
169
#24297: File 121 online (http://media.pragprog.com/titles/rails/code/depot_testing/test/performance/order_test.rb) doesn't quite match the code on the...more...
P4.0
15-Mar-06
169
#24298: When running the performance test it fails with a MySQL foreign key constraint violation. Examining the test log file, it's because the first ...more...
P4.0
15-Mar-06
170

#24347: The use of transactional fixtures is already standard in my version of Rails (set in test_helper.rb).--Juergen

P4.0
21-Mar-06
170

#25446: h

P4.0
14-Jul-06
176
#24151: Running the code listed for File 121 on Page 176 of the book (12.7 Performance Testing) produced an integrity constraint violation error from ...more...
P3.0
17-Feb-06
183
#23936: Grouping controllers in modules: I have grouped controllers as described in this section using the command format: myapp> ruby script/generat...more...
P3.1
10-Jan-06
193
#25395: Logging In Now that we have a user in the test database, let's see if we can log in as taht user. If we were using a browser.... ---- ...more...
P4.0
03-Jul-06
207
#24548: Order.find_on_page(page_num, page_size) the above function defined should probably be more like, def Order.find_on_page(page_num,page_si...more...
P4.0
27-Apr-06
209
#23966: To be a little more consistent, I think the line order = Order.find_all_by_email(params['email']) should be "orders = .... " to match t...more...
P4.0
19-Jan-06
212
#23876: <blockquote><code>result = Product.update_all("price = 1.1*price", "title like '%Java%'") </code></blockquote> It would have been useful if...more...
P3.1
23-Dec-05
213 222
#23948: In the bit about save vs. save! when it comes to callbacks in there too it doesn't work exactly like that either :-( Went digging and found h...more...
P4.0
17-Jan-06
221
#24423: With regard to assigning a new object to a has_one relationship, the text suggests the following code: invoice = Invoice.new # fill in...more...
P4.0
07-Apr-06
226
#24200: "It's worth noting that it isn't the foreign keys that set up the relationships. These are just hints to the database that it should check th...more...
P1.0
25-Feb-06
226

#24560: 6th paragraph -- "This is useful in cases where simply adding to the where clause using the :condition option isn--Rob Leslie

P4.0
01-May-06
228

#24383: In the second sentence: "You indicate these relationships..." the word relationships is misspelled ('relatonships').

P3.0
27-Mar-06
232
#23914: Regarding class User < ActiveRecord::Base has_and_belongs_to_many :articles def read_article(article) articles.push_with_attri...more...
P4.0
02-Jan-06
236
#23933: The section on counters states: "How many lines items does this order have?" but then the counter is created with the product, so instead it a...more...
P1.0
10-Jan-06
250
#23873: I would really value an expansion on how to induce #error_message_for to format validation errors for objects that have been rolled back (by t...more...
P3.0
21-Dec-05
261

#23930: validates_format_of: syntax coloring error in example code; "in" should be blue instead of red--Benoit Gagnon

P4.0
08-Jan-06
261
#24012: I couldn't work out really quickly how to make a test case work to see if this is true or not, but it seems like the default message for valid...more...
P4.0
02-Feb-06
266
#23913: Not certain, but shouldn't the regexp in def normalize_credit_card_number self.cc_number.gsub!(/-\w/, '') end contain \s rather than...more...
P4.0
02-Jan-06
267
#23917: If there is no difference between created_on and created_at, nor between updated_on and updated_at, perhaps this should be stated (even more) ...more...
P4.0
02-Jan-06
269
#24504: The Encrypter class reads: def initialize(attrs_to_manage) when it should have a splat: def initialize(*attrs_to_manage) in order ...more...
P4.0
20-Apr-06
273
#25454: result.each do |line_item| puts "Line item #{line_item.id}: Should fail, as result = LineItem.find_by_sql("select quantity, quantity*un...more...
P4.0
15-Jul-06
279
#24171: At the beginning of the ActiveController section(16.1) the process of the loading of an ActionController is described. There it says that the ...more...
P4.0
22-Feb-06
301
#23883: If a section header is the first thing on a page, the link from the TOC will land on the page previous to the start of the section. Also, t...more...
P3.0
27-Dec-05
302

#25364: "You can pass additional parameters as a hash to these named route."

"route" should be pluralized--Austin

P2.0
29-Jun-06
302

#23949: Shouldn't the OrderController class extend ApplicationController or ActionController... not ActiveRecord::Base?--Ben Munat

P3.0
17-Jan-06
306

#23904: I'm thinking the link to the 16.8/p323 should actually be to p310 re: Session Expiry and the :session_expiry and not to page caching?--Chris Nolan.ca

P4.0
01-Jan-06
308
#28391: You refer to "Session Container Performance in Ruby on Rails" hosted in your site. The overall picture comparison is not available (media.prag...more...
P6.0
08-Apr-07
319

#24221: The first line of verify_premium_user is a return statement. That can't be correct, can it?--Jeff de Vries

P4.0
01-Mar-06
330

#24320: Why does verify_premium_user have a "return" statement as the first line in its definition? I believe this is a typo.--Justin Johnson

P4.0
17-Mar-06
336

#24590: In <%= number_with_delimiter(12345678, delimiter = "_") %> I suspect the second argument should be :delimiter => "_".--Rob Leslie

P4.0
02-May-06
344

#24375: and the corresponding value are the value

and the corresponding values are the value--Robin Bhattacharyya

P4.0
24-Mar-06
351
#24482: There is only a couple of lines about RSS. Could you please include an example of how this works both on the server side and client side. Afte...more...
P2.0
14-Apr-06
351
#24277: "Finally, the magic option :encode=>"javascript" uses client-side Javascript to obscure the generated link, making it harder for spiders to ha...more...
P3.0
10-Mar-06
352

#24387: In the RHTML-code at the bottom of the page, inside the for user loop, the <tr> tag isn't closed. Thanks for an awesome book!--Mathias Wittlock

P3.0
28-Mar-06
357
#24206: In description of text fields: "common options include :size... and :maxsize..." Shouldn't the last be ":maxlength", in order to have the bro...more...
P4.0
26-Feb-06
359
#24356: It would be great if you showed some code to illustrate your point "in reality the find would probably be either in the controller or in a hel...more...
P3.1
22-Mar-06
362
#26318: I found it hard to get through the upload process. When precisely the picture= accessor is called? It is called in the model, down in ActiveRe...more...
P6.0
19-Oct-06
363
#24226: The file uploading process described here is accurate, complete and helpful but it includes a sentence that makes its use potentially ambiguou...more...
P4.0
02-Mar-06
369
#23964: "If the current request is being handled by a controller called store, Rails will by default look for a layout called store_layout (with the u...more...
P3.0
18-Jan-06
375
#23934: render_component passing the controller as a symbol generates a camelize error with rails 1.0. Various irc members also mentioned that it is a...more...
P1.0
10-Jan-06
377

#24336: "It's in the file get_links in the component's link subdirectory." -> "It's in the file get_links.rhtml in the component's link subdirectory."--Justin Johnson

P4.0
20-Mar-06
380
#23819: Note page# is acrobat reader page# - number in header is 380 The Observer code in this section does not work. To cut a long story short the...more...
P3.0
05-Dec-05
380
#24414: Unfortunately, this could be user error, but I copied and pasted the code samples directly from your site. When I buit the AJAX guessing ga...more...
P4.0
06-Apr-06
386

#24377: this would be not be a big deal

this would not be a big deal--Robin Bhattacharyya

P4.0
24-Mar-06
387

#26895: "... in real life it might remove a remove from a database table" should probably be "... in real life it might remove a row from a database table"

P6.0
28-Jan-07
391
#23839: The AJAX example using form_remote_tag() on pages 391-392 doesn't work. I downloaded the code directly from the website and tried it on Windo...more...
P1.0
12-Dec-05
392
#23931: If you download File 202 (update_many.rhtml), be aware that this file is actually generating Javascript, not HTML; therefore, the embedded HTM...more...
P4.0
09-Jan-06
393

#24113: It uses a trvial partial template for each line.

"trivial"

P4.0
12-Feb-06
394

#24114: "We’ll put these in a <script> section in our page header, but the header is defined this the page template." -- grammatical typo

P4.0
12-Feb-06
395
#26319: "@phrase = request.raw_post || request.query_string" does not allow me to test the search by entering an URL such as "/controller/search?ruby"...more...
P6.0
20-Oct-06
397

#24115: "If you want _to_ different actions depending on whether JavaScript is enabled..." --> "two"

P4.0
12-Feb-06
398 410

#24378: Under Web V2.1 heading: Need a comma after "(à l Google Suggest)".--Carol Deihl

P4.0
24-Mar-06
404
#23941: Fading out the random three elements does not work with the File 202 (update_many.rhtml) as downloaded. Nothing happens until you remove the c...more...
P1.0
12-Jan-06
415
#26459: OK this might just be my misunderstanding... but the @body hash is described as the vehicle for passing values to the template, however the ex...more...
P3.0
01-Nov-06
415
#24426: The section on E-mail templates calling partials is ok if the partial is in the same directory as the template. But what if the partial is in ...more...
P2.0
08-Apr-06
417
#24425: The section on Delivering HTML-Format E-mail is too brief. There needs to be a discussion of using a layout for the email and when and where ...more...
P2.0
08-Apr-06
425
#24156: The chapter on web services seems like notes. It would be better if there were a few more examples of less trivial situations. I'd like to see...more...
P4.0
20-Feb-06
436
#24157: The two sections on external clients are confusing. Why are the endpoints listed in the XML-RPC section when they also apply to SOAP. I know t...more...
P4.0
20-Feb-06
437
#26390: "For delegated and layered dispatching, the information telling us which service object teh invocation should be routed to is embedded in the ...more...
P3.0
25-Oct-06
438

#23999: The "File Uploads" bookmark incorrectly points to the page previous to the actul "File Uploads" section.--Robert Stuttaford

P4.0
29-Jan-06
440

#24185: How do you quote SQL in the :order parameter? I tried :order => ["? ASC", order_by], but the ?s weren't expanded.--Justin Johnson

P2.0
23-Feb-06
451
#24240: Sorry, my fault I should have you reported this but when I saw it the first time. But I wasn't used to report bugs to the publisher directly. ...more...
P4.0
06-Mar-06
457
#24275: For your next edition: Lighttpd is now available for Windows and configuration details for that platform would be very useful. I have tried to...more...
P2.0
10-Mar-06
464
#25206: Found a solution to this on a message board (http://threebit.net/mail-archive/rails/msg00948.html). Seems the solution is to use ::ActionContr...more...
P1.0
08-Jun-06
464
#23943: I don't know if this is a problem with Rails 1.0, Ruby 1.8.4, or something else entirely, but I could not get the rescue_action_in_public to l...more...
P3.0
13-Jan-06
464
#24247: I have the same error generated from page 464 of the P3.0 September printing - as Jim Elliot (#2298) suggests 'unitialized constant' "ActionUn...more...
P4.0
07-Mar-06
474
#24525: "Creating the log files slows down the rendering of the action quite a lot on most machines" Really? If so, perhaps you could talk about h...more...
P4.0
25-Apr-06
477

#29343: animals = %w( ant bee cat dog elk )

should be...
animals = %w{ ant bee cat dog elk }--tim

P1.0
20-Jul-07
477
#24481: "put the start of the block at the end of the source line containing the method call." This is ambiguous; what if I have a method call, a w...more...
P4.0
13-Apr-06
487
#26707: "[...], sharing the modules functionality without using inheritance." should be: "[...], sharing the module's functionality without us...more...
P2.0
03-Dec-06
515
#24365: The following line drove me nuts... <div class="seperator">&nbsp</div> ... as it kept on producing a questionmark(?) in the view. I thus r...more...
P3.0
23-Mar-06
517
#24433: Could the Index get its own entry in the outline view (Preview's 'drawer')? It always takes a couple brain cycles to remember to go to Append...more...
P4.0
10-Apr-06
527
#24241: Page 527 (Appendix C.3 Cross-Reference of Code Samples): Text states: "If a source sample has a marginal note containing a number, you can ...more...
P4.0
07-Mar-06
910faauyff 8mx2hvufgn

#30015: 5w69cgk6 xo5wz0aey wfj22eyi--7kkmix6ro3

P2.0
16-Dec-07

Stuff To Be Considered in the Next Edition

PDF Paper Description Found in Fixed in
ii
#23826: Please put a list of Rails reserved words inside the front/back cover. Maybe with a footnote to never use them as column headings in your t...more...
P1.0
09-Dec-05
1

#23512: For the next version a few plug-in examples would be nice

P2.0
03-Nov-05
6
#23137: Under "Rails Versions", both "Rails V1.0" and "Rails 1.0" are referred to. I think the "V" is unnecessary, so standardising on "Rails 1.0" wou...more...
P1.0
27-Jul-05
20
#23824: Linux Redhat FC4, doesn't install what you expect when you install ruby via YUM. To get a more complete ruby install type: <code>yum -y in...more...
P3.1
09-Dec-05
40
#24138: Re: Hashes and Parameter Lists I'm new to Ruby, but have read page 474 on Arrays & Hashes - it made sense, apart form the last part on Hash...more...
P4.0
16-Feb-06
51
#23882: Having the table definition using the equivalent Active Record Migrations definition would be nice. In this example I've substituted float fo...more...
P4.0
26-Dec-05
52
#23825: For P53 to work on Fedora Linux FC4, it appears one has to install the mysql gem. Unfortunately that won't build unless you have previously i...more...
P3.1
09-Dec-05
53
#23818: Running OS X 10.4.3 and following all the directions in this chapter, I get to the place where I'm generating the scaffold and nothing works c...more...
P3.0
05-Dec-05
53
#23842: On OSX Tiger (10.4.3) - Ruby 1.8.2 - Rails 1.0.0 - MySql 5.0 I was blocked using this command: ruby script/generate scaffold Product Adm...more...
P3.1
13-Dec-05
53
#23149: Regarding the /tmp/mysql.sock problem mentioned above. I had the same problem running on Fedora Core 4, there was no mysql.sock in /tmp. I ...more...
P1.0
31-Jul-05
53
#23479: This is a follow-up to my post of earlier this morning. I don't know whether it's definitive, but I've found a solution that works for me: ...more...
P3.0
26-Oct-05
53

#23251: On Mac OS X I was getting the error "Access denied for user --Lyle Vogtmann

P2.0
16-Sep-05
53
#23795: This not so much a new erratum as a request that erratum #1073 on page 53 of the PDF file be explained in more detail than it currently appear...more...
P3.0
27-Nov-05
54
#23459: Now that MySql 5.0 is "generally available", novices to MySQL may encounter an ERROR 42000: Can't find any matching row in the user table. Th...more...
P2.0
25-Oct-05
62
#23111: The suggested image url is relative /images/sk_auto_small.jpg but the validation requires a full url starting with http. (Dave says: I'm g...more...
P1.0
17-Jul-05
64
#23540: This is the first mention of validation that I saw in the book. I'm experimenting with a database containing constraints and the question tha...more...
P2.0
10-Nov-05
67
#23892: The hyperlink to click back to page 56 goes to page 54. The reference to material on page 56 is correct, just the location the link moves you...more...
P4.0
30-Dec-05
68
#24112: Another problem with web development is keeping HTML formating separated from its content. (The idealization of this concept is the 'semantic...more...
P4.0
11-Feb-06
75
#23880: In task A, class names in HTML are in CamelCase, like ListLine, ListTitle (p. 69). In task B, class names in HTML are in lower case, like cat...more...
P2.0
24-Dec-05
76
#23902: The equivalent Active Record Migrations definition of line_items table: class CreateLineItemsTable < ActiveRecord::Migration def self.up...more...
P4.0
31-Dec-05
77

#23895: Since mysql 4.0, InnoDB has become the default storage engine, and it supports foreign key. This seems to make footnote 1 on this page unnecessary.
--Haobo Yu

P4.0
31-Dec-05
96
#23394: in the action add_to_cart we have a rescue that states in the logger.error "Attempt to access invalid product #{params[:id]}" ...thats not ne...more...
P2.0
18-Oct-05
108

#23907: Using <%= error_messages_for( :order ) %> in book while the files contain <%= error_messages_for( "order" ) %>--Jon Smirl

P3.0
02-Jan-06
122
#23847: It looks like the pluralize method added to the controller is designed to provide you feedback even if you've checked no items to ship (the wh...more...
P3.0
14-Dec-05
122 129

#23180: See the last paragraph before the screenshot. Starts with the text "That--Tom Brice

P2.0
19-Aug-05
126
#23074: The sentence that begins "If you are following along, delete your session file..." refers ,I believe, to a technique discussed in footnote 5 o...more...
B1.0
08-Jul-05
134
#23893: Not sure if this is a difference between Rails versions, but in the test_truth method of ProductTest, the book reads "assert_kind_of Product, ...more...
P4.0
30-Dec-05
138
#23276: The code on page 138 of the book is incorrect redirect_to(jumpto) will not work if jumpto contains nested hashes. For example, if jumpto co...more...
P1.0
05-Oct-05
140
#23868: In Rails 1.0 the defaults behaviour for fixtures in tests changed. If you use MySQL without transactions (as you will if you follow the book),...more...
P3.1
20-Dec-05
140
#23798: "Here�s the bottom line: even if a test method updates the test database, the database is put back to its default state before the next test...more...
P3.0
28-Nov-05
146

#23843: Further to Mark's suggestion it is probably better to update the test/test_helper.rb file, which is where these values are explicitly set.--Chris Sendall

P2.0
14-Dec-05
149 146
#23789: When you start calling the test_delete and test_read_with_hash methods the code breaks. In order for the code to work you have to put the foll...more...
P3.0
24-Nov-05
150 157
#23858: I was having problems getting the tests described in chapter 12 to work. Specifically, once i deleted a piece of test data (test_destroy), th...more...
P3.1
18-Dec-05
151
#23577: I agree with Richard Jensen's comment, the paragraph beginning "While the use of time is a convenient way of demonstrating a dynamic fixture.....more...
P2.0
20-Nov-05
173
#23264: I run 'rake test_units' as instructed and get an error because the line_item_tests (which we haven't modified) fail. This appears to be due to...more...
P1.0
28-Sep-05
176
#23265: The performance test doesn't run. 1) Error: test_save_bulk_orders(OrderTest): ActiveRecord::StatementInvalid: #23000Cannot delete or u...more...
P1.0
28-Sep-05
185
#23865: "See the Active Support RDoc for details." If it has been mentioned anywhere how to do this, I missed it, and so did s search of the PDF for R...more...
P3.1
20-Dec-05
191
#23874: In Rails 1.0, the Inflector class correctly handles "sheep", so the example that reads " if you have a class named Sheep, it’ll valiantly try ...more...
P3.1
22-Dec-05
216
#23867: Could you add sub-sections in Database relationship (or in large chapters in general) so it'll be easier to navigate to a specific sub-chapter...more...
P3.1
20-Dec-05
259
#23575: Love the book, it's somewhat warn now! It would be great if you could include end to end examples of Localization; example: SQL date in the...more...
P2.0
20-Nov-05
300

#23963: Minor! "Cookies and Sessions" in the PDF's table of contents points to the bottom of page 300. The section actually begins at the top of page 301.--Grant Hollingworth

P4.0
17-Jan-06
328
#23548: Discussion of templates leaves out the rules for comments. I went nuts for two days trying to find the syntax error when my html comment was...more...
P3.0
12-Nov-05
352

#23130: It would be nice to see a discussion of file uploading that doesn't insert the file into the database in a future version of the book.

P1.0
23-Jul-05
387 399
#23165: The code described as "File 194" has "<% 16.times do |i| ..." which I think is trying to build a 4x4 series of squares, but the diagram on the...more...
P1.0
07-Aug-05
401
#22935: Could you guys consider squeezing in some more information about Unicode? It is true that Ruby's support for Unicode is not as mature as, say,...more...
B2.0
26-Jun-05
551
#23569: It would be nice if the RecordNotFound exception was included in the index, as the RecordInvalid exception is. The index entry could refer to ...more...
P1.0
18-Nov-05
551

#23570: New index entry for RecordNotFound exception could also reference the "Iteration C2: Handling Errors" section starting on page 91.--Stephen Viles

P1.0
18-Nov-05