small medium large xlarge

Errata for Rails for PHP Developers

 

The latest version of the book is P1.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.

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

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: B2.0 (28-Sep-10)
#45166
PDF page: tennysonbl
Paper page: tennysonbl

due forcings routes--tennysonbl

  • Reported in: B2.0 (28-Sep-10)
#45167
PDF page: ricestedm
Paper page: ricestedm

variations cost thermal warms--ricestedm

  • Reported in: P1.0 (17-Apr-09)
#38908
Paper page: 1
It is appalling that the page numbers for errata are keyed only to PDFs, and are completely different from the version held by paying customers of you...more...
  • Reported in: P1.0 (23-Feb-08)
#31034
Paper page: 10-11

A "work>" prompt appears on page 10, but the cd work command doesn't appear until page 11 --Brad

  • Reported in: P1.0 (23-Feb-08)
#31035
Paper page: 13
The shaded folder is shown as getting_started_with_rails/newsletter_1/config/database.yml. Shouldn't this be work/newsletter/config/database.yml? On l...more...
  • Reported in: P1.0 (21-Feb-08)
#31003
Paper page: 21
Last sentence in 2nd last para. "We'll use an method" should be "We'll use a method. Not a big deal, admittedly, but see also omission on same page. -...more...
  • Reported in: P1.0 (21-Feb-08)
#31004
Paper page: 21
The code for the class at the bottom of the page could be mistakenly entered into the already open model file. Suggest inclusion of a line of text suc...more...
  • Reported in: B2.0 (17-Jan-08)
#30508
PDF page: 25
May be already addressed, but I suggest recommending an install of Rails 2.0.2 instead of 2.0 RC2 aka v1.99.1, if it's not too late. (And thank you fo...more...
  • Reported in: P1.0 (20-Feb-08)
#30943
PDF page: 28

Would be nice to mention rake db:create instead of of the DB-dependant mysqladmin.--Jens Bremmekamp

  • Reported in: P1.0 (20-Feb-08)
#30944
PDF page: 33
Second to last paragraph: "In this case, the functionality of our Newsletter class (...)" Should be "... of our Subscriber class...", no?--Jens Bre...more...
  • Reported in: P1.0 (07-Oct-11)
#47713
PDF page: 38

form_for should be form_tag

  • Reported in: P1.0 (20-Feb-08)
#30945
PDF page: 38

Last paragraph: "We've also used a helper method named form_for (...)"

It's form_tag.--Jens Bremmekamp

  • Reported in: P1.0 (18-Feb-09)
#37821
PDF page: 40

"will be automatically be checked"

One too many "be"--David Andres

  • Reported in: P1.0 (02-May-08)
#31853
PDF page: 52

"It was shows"

  • Reported in: B2.0 (10-Jan-08)
#30440
PDF page: 52

In the PHP code, the comments displaying the arrays values should be switched.
$a contains the associative array, not $b.

  • Reported in: P1.0 (02-Mar-09)
#38090
Paper page: 63
The second to last line seems to be missing an "it": "...@price as if were a public attribute." should probably be "...@price as if it were a publ...more...
  • Reported in: B2.0 (19-Jan-08)
#30514
PDF page: 68

Double 'the' in the second paragraph. "The ampersand (&block) tells Ruby to store this object in the the variable called block."

  • Reported in: B2.0 (22-Jan-08)
#30548
PDF page: 69
"enough buzz about Rails to finally peak his interest" should be "enough buzz about Rails to finally pique his interest." "Peak" => noun; top of so...more...
  • Reported in: B2.0 (30-Jan-08)
#30638
PDF page: 80

in the second paragraph the word "contining" should be "containing" shouldn't it?--Valentin

  • Reported in: P1.0 (20-May-08)
#32106
PDF page: 81

'can be a strictly type language' should read 'can be a strictly typed language'--Mike van Lammeren

  • Reported in: B2.0 (30-Jan-08)
#30639
PDF page: 82

in the second paragraph
...Since both ducks and {shouldn't that be goose?} are part of the Anatidae family...--Valentin

  • Reported in: P1.0 (10-Apr-08)
#31636
PDF page: 95

In 3.10 Exercises second line "We already reopened Fixnum to add the odd?" should be "We already reopened Integer to add the odd?"--Adi Gabai

  • Reported in: P1.0 (20-Apr-09)
#38954
Paper page: 96
self.up in db/migrate/001_create_users.rb has the line t.text :profile, :text This creates a spurious field "text". It should be t.text :pro...more...
  • Reported in: P1.0 (23-Jun-09)
#39617
PDF page: 98

[Figure 4.1; row 4]
The word "brief" is misspelled as "breif"

P.S. The book is great! I love it--Jakob Buis

  • Reported in: B2.0 (01-Feb-08)
#30654
PDF page: 99

In the feature list nr. 4
... list members with a {brief NOT breif} description

  • Reported in: P1.0 (13-Jun-08)
#32379
PDF page: 110

the source code for the self.down() method is missing.--Sean Buttinger

  • Reported in: B2.0 (20-Jan-08)
#30517
PDF page: 111

Missing:
‘updated_at‘ datetime default NULL,

in the SQL-code.

  • Reported in: P1.0 (07-May-08)
#31919
Paper page: 115
In the figure at the top of the page (F 5.4: The meetings index page) the screen cap shows the file URI as app/views/meetings/index.rhtml Howeve...more...
  • Reported in: P1.0 (15-Mar-08)
#31248
PDF page: 123

Is: reoccurring
Should be: recurring
In: "...these seven actions tend to show up as a reoccurring
patter n in applications."--Noah Lackstein

  • Reported in: P1.0 (26-Feb-08)
#31051
PDF page: 123

In Fig. 5.2 in the "View Naming Conventions" box

File: app/views/new.html.erb
should be
File: app/views/users/new.html.erb--Jens Bremmekamp

  • Reported in: P1.0 (14-Jun-08)
#32383
PDF page: 123

in the second box of fig. 5.2, the views url should be /app/views/users/new.html.erb--Sean Buttinger

  • Reported in: P1.0 (20-May-08)
#32109
PDF page: 129

'Lucky for us' should be 'Luckily for us' since the errors luckily display only in the development environment.--Mike van Lammeren

  • Reported in: P1.0 (07-Oct-08)
#34956
PDF page: 130

If the "()" are left on the CURRENT_TIMESTAMP, ie CURRENT_TIMESTAMP() then rails errors, remove them and it works. Lines 4 and 9 in the code block.

  • Reported in: B2.0 (20-Jan-08)
#30518
PDF page: 138

Last line should read "“No Meetings” as the tag content" instead of "“New Meeting” as the tag content"

  • Reported in: P1.0 (30-Dec-08)
#36702
Paper page: 144

In the third paragraph, "public/stylesheeets" should be "public/stylesheets"--Tim Binder

  • Reported in: P1.0 (29-Apr-08)
#31815
Paper page: 152
When I add the line validates_presence_of: meets_on to my meeting class and I view the the localhost:3000/meetings page, I get the following error:...more...
  • Reported in: P1.0 (11-May-08)
#31974
Paper page: 152

I had the same error as another reader - was because on the validates_length_of I had missed the : off the :minimum - the book was correct.--Chris

  • Reported in: B2.0 (20-Jan-08)
#30519
PDF page: 156

Links for stylesheet and images in the footer is inaccessible (forbidden).

  • Reported in: P1.0 (24-Apr-09)
#38986
Paper page: 156
This applies to Chapter 6. The version of Rails I am using as of April 2009 (Rails 2.3.2) uses ActiveSupport::TestCase instead of Test::Unit::TestCase...more...
  • Reported in: P1.0 (06-Mar-10)
#42422
Paper page: 159
I'm looking at the unit test called "test_should_format_date_as_name". The regular expression /\w* \d{1,2}, \d{1,4}/i is in error. The text 'Mar...more...
  • Reported in: P1.0 (30-Dec-08)
#36711
Paper page: 161
When running the test suite at the end, I get "6 tests, 10 assertions", not the "6 tests, 9 assertions" shown in the book. The correct could seems to ...more...
  • Reported in: P1.0 (30-Dec-08)
#36712
Paper page: 161
(Great, I'm submitting an erratum for my own report, since I can't edit it.) In #36711 "correct could" should be "correct count". [Filed as technical ...more...
  • Reported in: P1.0 (24-Oct-08)
#35434
PDF page: 167

shouldn't it be
ruby -I test test/unit/meeting_test.rb
rather than ruby test/unit/meeting_test.rb
?

  • Reported in: B2.0 (20-Jan-08)
#30520
PDF page: 175

Maybe explain the AddColumnsToTable / RemoveColumnsFromTable convension?

  • Reported in: B2.0 (20-Jan-08)
#30521
PDF page: 179

"We’ll have to manually add the create method since it does not require a view"

- And update and destroy too

  • Reported in: B2.0 (20-Jan-08)
#30522
PDF page: 184

From the console commands: user = User.find(1)

This will not work as there is no user in the db yet.

  • Reported in: P1.0 (12-Apr-08)
#31655
PDF page: 231
The code example's first line at the bottom of page 231 (PDF) looks like this: <% elsif user_owns_record? %> I guess it should be "elseif" inste...more...
  • Reported in: P1.0 (07-May-08)
#31918
PDF page: 231
Paper page: 223
David Trasbo's reported error on page 231 of the PDF (223 of the paper version I'm looking at) is wrong. 'elsif' is the proper spelling in Ruby (and a...more...
  • Reported in: P1.0 (22-May-08)
#32141
PDF page: 250

The required Apache module should read "mod_proxy-http," not "-html."--Christopher Barnes

  • Reported in: P1.0 (12-Apr-08)
#31654
PDF page: 308
I'm new to rails, and just bought the books, but I think this may be wrong: ---------------------- page = 1 begin puts page page += 1 ...more...