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 P1.0,
released about 2 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.
| PDF |
Paper |
Description |
Found in |
Fixed in |
|
11 |
#52022: The suggestion in the online Errata to remove render_to_string does cause the test to pass, but it does not render a .pdf file as it should.
The problem is that we did not create an index.html.erb file as a template. The book says we should.
In other words, there should be no erratum for this issue. --Jesse Farmer #52022: The suggestion in the online Errata to remove render_to_string does cause the test to pass, but it does not render a .pdf file as it should.
...more...
|
P1.0
17-Jun-13
|
|
| 13 |
|
#46407: The HEading of what is really Chapter 1 create our own Renderer is listed as Chapter 4 Create our own Renderer in the Kindle Version. Location 121-129--Charley Stran
|
B3.0
16-Feb-11
|
|
| 13 |
|
#47604: update Enginex gem ..
$ rake test
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
`include Capybara` is deprecated please use `include Capybara::DSL` instead.--yves dufour #47604: update Enginex gem ..
$ rake test
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
`include Capybara` is depreca ...more...
|
P1.0
20-Sep-11
|
|
| 22 |
|
#47953: Running with:
ruby 1.9.2p312 (2011-08-11 revision 32926) [x86_64-darwin10.8.0]
Rails 3.0.10
capybara (1.1.2)
rake test fails with:
encoding error : output conversion failed due to conv error, bytes 0xFF 0xC3 0xBF 0xC3
I/O error : encoder error
Change in test/integration/navigation_test.rb
From:
assert_match /Prawn/, page.body
To:
assert_match /Prawn/, page.source
rake test passes clean
Suspect capybara internals change - Gemfile could be pinned to the older version of Capybara that works as advertised (or not).--Rick Lloyd #47953: Running with:
ruby 1.9.2p312 (2011-08-11 revision 32926) [x86_64-darwin10.8.0]
Rails 3.0.10
capybara (1.1.2)
rake test fails with:
...more...
|
P1.0
16-Nov-11
|
|
| 22 |
|
#47603: latest test run doesn't pass ...
rubyrails:pdf_renderer (ruby-1.9.2@rails310)$ rake test
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
`include Capybara` is deprecated please use `include Capybara::DSL` instead.
Loaded suite /Users/yves/.rvm/gems/ruby-1.9.2-p290@rails310/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
encoding error : output conversion failed due to conv error, bytes 0xFF 0xC3 0xBF 0xC3
I/O error : encoder error
F.
Finished in 0.360567 seconds.
1) Failure:
test_pdf_request_sends_a_pdf_as_file(NavigationTest) [/Users/yves/Developpement/Projects/CRAFTING/pdf_renderer/test/integration/navigation_test.rb:15]:
Expected /Prawn/ to match "".
2 tests, 6 assertions, 1 failures, 0 errors, 0 skips
Test run options: --seed 63768
rake aborted!
--yves dufour #47603: latest test run doesn't pass ...
rubyrails:pdf_renderer (ruby-1.9.2@rails310)$ rake test
rake/rdoctask is deprecated. Use rdoc/task ins ...more...
|
P1.0
20-Sep-11
|
|
| 26 |
|
#46686: ... and it breaks down in two main steps:
would read better as
... and it breaks down into two main steps:--Andreas Kemkes
|
B3.0
27-Mar-11
|
|
| 33 |
|
#46729: ... our first test pass.
should read
... our first test passes.--Andreas Kemkes
|
B3.0
02-Apr-11
|
|
| 35 |
|
#46608: Last paragraph. First sentence.
"attributes methods" should be "attribute methods" (i.e. without the s)
or (suggestion)
"Attribute Methods" given you used "Active Record" for ActiveRecord--Kenneth Lindsey Calamay #46608: Last paragraph. First sentence.
"attributes methods" should be "attribute methods" (i.e. without the s)
or (suggestion)
"Attribute Me ...more...
|
B3.0
18-Mar-11
|
|
| 35 |
|
#46730: ... uses attributes methods extensively.
should read
... uses attribute methods extensively.--Andreas Kemkes
|
B3.0
02-Apr-11
|
|
| 37 |
|
#46609: Third paragraph. Second line.
"generate an unique url" => "an" should be 'a'--Kenneth Lindsey Calamay
|
B3.0
18-Mar-11
|
|
| 37 |
|
#46731: ... and two other methods required by Active Model as well: ...
should read
... as well as two other methods required by Active Model: ...--Andreas Kemkes
|
B3.0
02-Apr-11
|
|
| 44 |
|
#46891: "After running `rake test`, all tests should be green again", but they're not! We've now made a template for our mail form to use, but never told it to use it, as far as I can tell. I'm not quite sure where to specify this, either.--chadoh #46891: "After running `rake test`, all tests should be green again", but they're not! We've now made a template for our mail form to use, but never t ...more...
|
P1.0
17-Apr-11
|
|
| 44 |
|
#46402: Where: Download mail_form/6_delivery/lib/views/mail_form/notifier/contact.text.erb
It is not clear from the text or the above path where this should be added.
The correct complete path should be:
mail_form/lib/views/mail_form/notifier/contact.text.erb
I initially interpreted the path to be:
mail_form/lib/mail_form/notifier/contact.text.erb
Only after consulting the code archive did it become clear what the correct path should be.
Please be explicit where chunks of code should go in the path hierarchy.
#46402: Where: Download mail_form/6_delivery/lib/views/mail_form/notifier/contact.text.erb
It is not clear from the text or the above path where th ...more...
|
B3.0
14-Feb-11
|
|
|
46 |
#50196: at least with rails 3.2.9
assert_equal ActionView::Template::Handlers::ERB, template.handler
has to be changed to
assert_kind_of ActionView::Template::Handlers::ERB, template.handler
for getting the tests to pass later on--Finn MacCool #50196: at least with rails 3.2.9
assert_equal ActionView::Template::Handlers::ERB, template.handler
has to be changed to
assert_kind_of ActionView ...more...
|
P1.0
23-Nov-12
|
|
|
47 |
#50197: at least with rails 3.2.9 the sql_template.rb needs the line
attr_accessible :body, :format, :handler, :locale, :partial, :path
for the tests to pass.--Finn MacCool #50197: at least with rails 3.2.9 the sql_template.rb needs the line
attr_accessible :body, :format, :handler, :locale, :partial, :path
for the te ...more...
|
P1.0
23-Nov-12
|
|
|
51 |
#50198: "As you learned in the code on page 59,..." should be "As you learned in the code on page 44,...".--Finn MacCool
|
P1.0
23-Nov-12
|
|
| 52 |
|
#46733: ... keeping an eye in performance.
should read
... keeping an eye on performance.--Andreas Kemkes
|
B3.0
02-Apr-11
|
|
| 61 |
|
#46652: First sentence after the comma
"some functionals tests" should be
"some functional test" i.e. without the s--Kenneth Lindsey Calamay
|
B3.0
23-Mar-11
|
|
| 61 |
|
#46653: The sentence just before the last code snippet:
"Let's do it by add the following line to UsersController"
should be
"Let's do it by adding the following line to UsersController"--Kenneth Lindsey Calamay #46653: The sentence just before the last code snippet:
"Let's do it by add the following line to UsersController"
should be
"Let's do it by addi ...more...
|
B3.0
23-Mar-11
|
|
| 63 |
|
#46892: """
== The Resolver's Cache
As your learned in the code on page 71 ActionView::Resolver’s find_all method…
"""
I'm on page 63, so I haven't read page 71 yet. ;-)--Chad Ostrowski #46892: """
== The Resolver's Cache
As your learned in the code on page 71 ActionView::Resolver’s find_all method…
"""
I'm on page 63, so ...more...
|
P1.0
17-Apr-11
|
|
| 64 |
|
#47224: To prove that Ruby in fact uses Object#hash to localize entries,..
localize -> locate
--John Warwick
|
P1.0
26-Jun-11
|
|
|
72 |
#46929: "Dual templates **rocks**!" —there's a subject-verb disagreement there. Should be "rock."--Eric
|
P1.0
24-Apr-11
|
|
|
74 |
#47023: First paragraph, last sentence reads "configure it to create .merb templates instead .erb" —probably should be "instead of .erb"--Eric Hayes
|
P1.0
05-May-11
|
|
|
91 |
#50200: the test suite isn't green as promised. i get the following error:
E:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `rescue in log': ArgumentError: wrong number of arguments(1 for 0): SELECT name (ActiveRecord::StatementInvalid)
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
.
.
.--Finn MacCool #50200: the test suite isn't green as promised. i get the following error:
E:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/li ...more...
|
P1.0
23-Nov-12
|
|
| 101 |
|
#46732: "mongo database" should be replaced by "MongoDB database"
"Mongo database" should be replaced by "MongoDB database"
Pages 101(2), 116(2), 117, 118, 119(2)--Andreas Kemkes #46732: "mongo database" should be replaced by "MongoDB database"
"Mongo database" should be replaced by "MongoDB database"
Pages 101(2), 116(2), ...more...
|
B3.0
02-Apr-11
|
|
| 103 |
|
#46734: ... but there is not such file ...
should read
... but there is no such file ...--Andreas Kemkes
|
P1.0
02-Apr-11
|
|
| 108 |
|
#47175: I tried "Hello Rack" application with Rack 1.2.3, which was installed by Bundler for Ruby on Rails 3.0.7. (I understand that the book is based on Ruby on Rails 3.0.3 and maybe it's using a different version of Rack.)
An error occurred:
ERROR Rack::Lint::LintError: Response body must respond to each
So I enclosed the body string in an array, i.e.:
[200, { 'Content-Type' => 'text/html' }, ['Hello Rack!']]
Then the "Hello Rack" application worked correctly. --Tadatoshi Takahashi #47175: I tried "Hello Rack" application with Rack 1.2.3, which was installed by Bundler for Ruby on Rails 3.0.7. (I understand that the book is based ...more...
|
P1.0
09-Jun-11
|
|
| 109 |
|
#46512: The Rack application on this page does not run on Ruby 1.9.2. The error is "Response body must respond to each". Ruby 1.9 (unlike 1.8) apparently doesn't provide an each method on string objects.
The Rack Specification states the body value in the environment argument "commonly is an Array of Strings, the application instance itself, or a File-like object".
A possible fix is to change the following line from this:
[200, { 'Content-Type' => 'text/html' }, 'Hello Rack!'] to this:
[200, { 'Content-Type' => 'text/html' }, ['Hello Rack!']]
thus making the body string into an array of strings.
This allows the application to run without error and with no change to the expected output.--Steve Morris #46512: The Rack application on this page does not run on Ruby 1.9.2. The error is "Response body must respond to each". Ruby 1.9 (unlike 1.8) apparen ...more...
|
B3.0
04-Mar-11
|
|
| 131 |
|
#49335: I cannot get why this source code appears here.
>>
Download responders/2_responders/test/dummy/app/views/layouts/application.html.erb
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></
<<--Yasuo Honda #49335: I cannot get why this source code appears here.
>>
Download responders/2_responders/test/dummy/app/views/layouts/application.html.erb
<p ...more...
|
P1.0
16-May-12
|
|
| 142 |
|
#47359: Hi,
I may have missed something but when I run "bundle exec rails g responders:install" nothing happens and I have "Could not find generator responders:install.".
I think the reason is that the new files were not declared in lib/responders.rb (require "responders/install/install_generator") I then have the following error :
install_generator.rb:3:in `<module:Generators>': uninitialized constant Rails::Generators (NameError)
Perhaps because require "rails/generators/base" is missing in lib/responders/install/install_generator.rb but then I have the following error :
railties-3.0.9/lib/rails/generators/base.rb:228:in `inherited': undefined method `subclasses' for Rails::Generators:Module (NoMethodError)
Undoubtedly I missed something, but I am stuck here...
Regards
Alex--Alex #47359: Hi,
I may have missed something but when I run "bundle exec rails g responders:install" nothing happens and I have "Could not find generato ...more...
|
P1.0
10-Aug-11
|
|
| 158 |
|
#46617: On:
autoload :App, "translator/app"
It should be:
require 'translator/app'
autoload :App, "translator/app"
The missing require will cause an "uninitialized constant Translator::App" exception on startup.
--Fabio Kreusch #46617: On:
autoload :App, "translator/app"
It should be:
require 'translator/app'
autoload :App, "translator/app"
The missing require wi ...more...
|
B3.0
19-Mar-11
|
|
| 160 |
|
#46584: 3rd code snippet. 2nd line.
.responds_to?(:call)
should be
.respond_to?(:call) -> without the s in respond(s)--Kenneth Lindsey Calamay
|
B3.0
15-Mar-11
|
|
| 213 |
|
#50362: (Location 213 of 4082 in Kindle): First "rake test" bombs with this error:
rake aborted!
GONE
/Users/cclogicimac/rails_projects/crafting_rails/pdf_renderer/Rakefile:10:in `require'
/Users/cclogicimac/rails_projects/crafting_rails/pdf_renderer/Rakefile:10:in `<top (required)>'
(See full trace by running task with --trace)
if you run it with --trace the additional lines are:
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:87:in `block in load_rakefile'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:70:in `block in run'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.0.2/bin/rake:37:in `<top (required)>'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/bin/rake:23:in `load'
/Users/cclogicimac/.rvm/gems/ruby-1.9.3-p194/bin/rake:23:in `<main>'
#50362: (Location 213 of 4082 in Kindle): First "rake test" bombs with this error:
rake aborted!
GONE
/Users/cclogicimac/rails_projects/crafting_r ...more...
|
P1.0
12-Dec-12
|
|
| 213 |
|
#50363: (213 of 4082 on Kindle) NOTE! You can get around this error by opening the Rakefile and changing line 10 to be require 'rdoc/task' (instead of rquire 'rake/rdoctask') #50363: (213 of 4082 on Kindle) NOTE! You can get around this error by opening the Rakefile and changing line 10 to be require 'rdoc/task' (instead ...more...
|
P1.0
12-Dec-12
|
|