small medium large xlarge

Errata for Rails for Java Developers

 

The latest version of the book is P1.0, released about 9 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: P1.0 (21-Mar-07)
#27901
Paper page: 5
Page 5 illustrates automated testing for the People application Running rake will fail (at least on my setup) as the first record, defined as "firs...more...
  • Reported in: P1.0 (31-Jul-07)
#29375
Paper page: 12
When running 'ruby script/console', I got the following error: ./script/../config/boot.rb:43:Warning: require_gem is obsolete. Use gem instead ...more...
  • Reported in: P4 (07-Feb-07)
#26947
PDF page: 13
You say this: This is a book about two worlds: the world of Java programming and the world of Rails programming. Whenever worlds collide, you can ...more...
  • Reported in: P1.0 (08-May-07)
#28958
Paper page: 19
The class TestPrimitives does not compile, because in the method, on line 1.: 0. public void testSomeLegalConversions() { 1. assertEquals(2.1, ...more...
  • Reported in: P4 (18-Jan-07)
#26861
PDF page: 20

Do you plan to add download links like the Agile Web Development w/ Rails book?--Jeff Duska

  • Reported in: P1.0 (04-Jan-08)
#30320
PDF page: 21
The "Rails App in Fifteen Minutes" section fails badly with Rails 2.0. I discovered the change in database configuration, and was able to change it t...more...
  • Reported in: P1.0 (08-Jan-08)
#30381
PDF page: 24
The sample scaffold app "people" doesn't successfully execute tests with a rake command in rails 1.2.6. It generates eight errors as follows: Stan...more...
  • Reported in: P1.0 (23-Nov-09)
#41605
Paper page: 30

Functions that use blocks for iteration tend [to] pass one or two parameters to the block... in 3rd to last paragraph. Thanks.--M. Roxas

  • Reported in: P1.0 (14-Apr-07)
#28534
PDF page: 31
When executing "script/console" the error occurs on macosx 10.4 (maybe should be mentioned how to solve). => Booting WEBrick... /usr/local/lib/rub...more...
  • Reported in: P4 (20-Jan-07)
#26864
PDF page: 43
The paragraph in question contrasts Ruby's dynamic typing with Java's static one. The word "also" seems out of place in the phrase "Java also provides...more...
  • Reported in: P1.0 (14-Mar-07)
#27639
PDF page: 43

Book:
irb(main):025:0> "Hello"[1,4]
=> "ello"

Should be:
irb(main):011:0> "Hello"[1-4]
=> 108--Vladimir

  • Reported in: P4 (19-Jan-07)
#26863
PDF page: 44

The sentence before 2.4 Collections and Iteration is missing the reference. "See for a few examples", see what?--Jeff Duska

  • Reported in: P1.0 (14-Mar-07)
#27640
PDF page: 58

Book:
class Person

Should be
class Person end

Note. "end" never appeared in the book for this class--Vladimir

  • Reported in: P4 (07-Feb-07)
#26952
PDF page: 59

spelling mistake: You have "responbility" and it should be "responsibility"--Eli

  • Reported in: P4 (21-Jan-07)
#26868
PDF page: 61
The book has: Ruby provides two equivalent methods: == and .eql?. (Why two methods? See .) The reference to the soapox is missing. Also, the exam...more...
  • Reported in: P4 (07-Feb-07)
#26953
PDF page: 62
The code from code/rails_xt/samples/programmer.rb (dated 11/28/06) doesn't run because it's missing the following at the top of the source code: re...more...
  • Reported in: P1.0 (23-Nov-09)
#41606
Paper page: 62

Unlike Java [source files], Ruby [source files are] not class-oriented--M. Roxas

  • Reported in: P1.0 (16-Mar-07)
#27795
PDF page: 73

assert nil.blank?
fails.--Vladimir

  • Reported in: P1.0 (16-Mar-07)
#27796
PDF page: 73

Method blank? definition
instead of
empty? || strip.empty?

strip.empty?
does the same job.--Vladimir

  • Reported in: P1.0 (23-Feb-07)
#27025
Paper page: 74

"function" has 8 letters rather than 7 (if that is the "seven letter f-word" mentioned).

  • Reported in: P4 (23-Jan-07)
#26876
PDF page: 77
The classpath in the Java command uses Unix separator character, ":". You may want to mention that Windows version of this command will use ";" as a s...more...
  • Reported in: P1.0 (24-Mar-07)
#27951
Paper page: 79
Tried the 'rake migrate' and rake 'db:migrate' as well, but getting the same error: "Illegal route: the :controller must be specified!" Any idea w...more...
  • Reported in: P1.0 (23-Feb-07)
#27024
Paper page: 79
To fix the error listed at #6143, just change the line map.connect 'people/:action/:full_name' to map.connect 'people/:action/:full_name', :con...more...
  • Reported in: P4 (08-Feb-07)
#26962
PDF page: 85
Can you show the Ruby classes so that one can compare these to the Java classes shown on previous page? This would help to see the difference of appr...more...
  • Reported in: P4 (08-Feb-07)
#26963
PDF page: 86

How about showing a simple example of duck typing. Theory is nice but concrete examples really help.--El

  • Reported in: P4 (29-Jan-07)
#26896
PDF page: 95
When running the rake command using Rail 1.2.1 you get the following message: Illegal route: the :controller must be specified! (ArgumentError) Th...more...
  • Reported in: P4 (20-Feb-07)
#27008
PDF page: 98

The rake task migrate has been deprecated. Should be "rake db:migrate".--Gerry Power

  • Reported in: P1.0 (16-Mar-07)
#27783
PDF page: 98
I am still having problems with the rake migrate. I added to map.connect 'people/:action/:full_name', :controller=>'people' Now it is indicating "B...more...
  • Reported in: P1.0 (19-Feb-07)
#26999
PDF page: 101
You should show somewhere that on InstantRails - in dos command window - one would have to type (after running the InstantRails' use_ruby.cmd to get t...more...
  • Reported in: P4 (29-Jan-07)
#26900
PDF page: 105

In the phrase "it can contain as any number of named parameters", word "as" appears to be superfluous.--Michael Smolyak

  • Reported in: P1.0 (20-Feb-07)
#27005
PDF page: 105

>>ended< is wrong. It should be:
>>end
--El

  • Reported in: P1.0 (20-Feb-07)
#27006
PDF page: 105
You totally hose up anyone who is trying to follow the example by having them migrate schema to version 0 so tables are wiped, then having them do ope...more...
  • Reported in: P1.0 (23-Nov-09)
#41607
Paper page: 118

Line numbers helpful here, similar to the lines numbers shown on p.102. Thanks.--M. Roxas

  • Reported in: P1.0 (25-Jun-07)
#29261
PDF page: 135
The download link does not work. Also, the routing code on page 135 DOES NOT CONTAIN the code that is described in the surrounding text. Take pity...more...
  • Reported in: P4 (01-Feb-07)
#26927
PDF page: 144

hERE IS A Filter--Michael Smolyak

  • Reported in: P4 (02-Feb-07)
#26930
PDF page: 146

I do not suppose you meant "nothing" in the sentence "It is worth nothing that servlet filters...".--Michael Smolyak

  • Reported in: P1.0 (16-Aug-07)
#29418
Paper page: 154
Ruby on Rails layout templates are .rhtml files, not html. Therefore: ... a template named app/views/layouts/foo.html should be changed to ... ...more...
  • Reported in: P4 (05-Feb-07)
#26935
PDF page: 167

I would expect the sample at the bottom of the page to refer to the <bfl> tag created above. There is no such reference, however.--Michael Smolyak

  • Reported in: P1.0 (18-Nov-07)
#29900
Paper page: 168
There are some syntax errors in the following two files: code/rails_xt/app/views/layouts/quips.rhtml code/rails_xt/app/views/quips/list.rhtml I...more...
  • Reported in: P1.0 (31-Jan-08)
#30653
PDF page: 169

hello.jsp: request.name should be param.name. I don't believe request.name works.--Matt Raible

  • Reported in: P4 (05-Feb-07)
#26936
PDF page: 178

Repeated "an" in "When Rails first renders an an action that is page cached".--Michael Smolyak

  • Reported in: P4 (05-Feb-07)
#26937
PDF page: 178

It should probably be "at all" in "Subsequent requests for the page do not encounter Rails as all".--Michael Smolyak

  • Reported in: P4 (06-Feb-07)
#26940
PDF page: 189
This sentence needs to be corrected: "Rails then generates JavaScript to replaces the contents of each DOM id with the result of rendering the partial...more...
  • Reported in: P4 (11-Feb-07)
#26976
PDF page: 245

Use "are" not "is" in
"The standardized CRUD interfaces is friendly to caches and layered systems."--Michael Smolyak

  • Reported in: P1.0 (16-Apr-07)
#28609
Paper page: 252

In the irb listing is an &gt; instead of > (I hope this doesn't get messed up when I submit it..)--Mirko Stocker

  • Reported in: P1.0 (15-Feb-07)
#26990
PDF page: 304

Appendix with postgresql(account and password) setup.--Jos