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 over 1 year 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 |
| 38 |
|
#46004: The last paragraph on page 38 has two sentences repeated at the top of page 39.
|
B8.0
14-Dec-10
|
|
| 44 |
|
#47901: url.get_protocol # Isn't assigned.
url = URL.new 'http', 'pragprog.com', '/titles' # FIFY--Johnneylee Jack Rollins
|
P1.0
06-Nov-11
|
|
| 44 |
|
#47902: attributes.rb doesn't really make sense to have a code example for, seeing as it's purely for users to digest and not actually run.--Johnneylee Jack Rollins
|
P1.0
06-Nov-11
|
|
| 58 |
|
#46185: Question I had reading this: does the become_java! method described earlier help at all with the "lost monkeypatches" problem? Or does it only apply to classes, not objects? #46185: Question I had reading this: does the become_java! method described earlier help at all with the "lost monkeypatches" problem? Or does it onl ...more...
|
B8.0
05-Jan-11
|
|
| 64 |
|
#47818: Issuing the command `ant`, the `do_compile` step fails due to not finding the jruby embed package.
I have issued this before running `ant`, just to make sure:
export CLASSPATH=$CLASSPATH:/Users/me/.rvm/rubies/jruby-1.6.4/lib/jruby.jar--José Moreira da Mota #47818: Issuing the command `ant`, the `do_compile` step fails due to not finding the jruby embed package.
I have issued this before running `ant`, ...more...
|
P1.0
26-Oct-11
|
|
| 68 |
|
#47903: Referring to ruby methods as functions and then again as methods is somewhat confusing. I suggest referring to ruby methods as methods and java functions as functions to keep things clear.
"While we're at it, we'll move the function into a class:"
"So far, we've been calling the history method by building up a string in Java with the word history in it. But JRuby can actually call the method directly, using the callMethod( ) operation."--Johnneylee Jack Rollins #47903: Referring to ruby methods as functions and then again as methods is somewhat confusing. I suggest referring to ruby methods as methods and jav ...more...
|
P1.0
06-Nov-11
|
|
| 83 |
|
#46413: "and long-running programs well seem" should be "and long-running programs will seem"
--Romain Primet
|
P1.0
17-Feb-11
|
|
| 106 |
|
#46264: There's a much better way to do platform detection for Jruby and regular ruby
You can say:
platforms :jruby do
gem 'activerecord-jdbc-adapter'
gem 'jdbc-sqlite3'
end
platforms :ruby do
gem 'sqlite3-ruby'
end
This works when the JRUBY_VERSION environment variable isn't defined, as when using RVM. It works in rails 3.0.3 out of experience.--David Kowis #46264: There's a much better way to do platform detection for Jruby and regular ruby
You can say:
platforms :jruby do
gem 'activerecord-jdbc- ...more...
|
B8.0
18-Jan-11
|
|
| 109 |
|
#45796: I think you are aware of an issue using JRuby 1.5.5 and Rails 3.0.3 but might make mention or make sure the reader is using newer version of JRuby (from git or release 1.5.6).--Todd Crone #45796: I think you are aware of an issue using JRuby 1.5.5 and Rails 3.0.3 but might make mention or make sure the reader is using newer version of J ...more...
|
B7.0
27-Nov-10
|
|
| 126 |
|
#46405: When generating the scaffold for Review, the first -- argument should be --migration, not --migrate. If using --migrate, the error at the command line will be prefixed with 'Another migration is already named create_reviews'--Greg Beams #46405: When generating the scaffold for Review, the first -- argument should be --migration, not --migrate. If using --migrate, the error at the com ...more...
|
P1.0
15-Feb-11
|
|
| 155 |
|
#46408: Building Ribs using the current version of rspec (2.5.0 as it type this), as installed by the previous commands, will fail as the Rakefile assumes the build will use version 1 of rspec.
The git diff is as following:
diff --git a/Rakefile b/Rakefile
index 2317c71..1ae0ff0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
require 'rubygems'
diff --git a/Rakefile b/Rakefile
index 2317c71..1ae0ff0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
task :ant do
ret = system('ant')
@@ -19,12 +19,10 @@ task :flog do
end
desc "Run all specs"
-Spec::Rake::SpecTask.new(:spec) do |t|
- t.libs << "test"
- t.libs << "lib"
- t.spec_files = FileList['test/**/*_spec.rb']
+RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = true
- t.spec_opts = ["-fs", "--color"]
+ t.rspec_opts = ["-fs", "--color"]
+ t.pattern = 'test/**/*_spec.rb'
end
task :spec => [:ant]
--Greg Beams #46408: Building Ribs using the current version of rspec (2.5.0 as it type this), as installed by the previous commands, will fail as the Rakefile ass ...more...
|
P1.0
16-Feb-11
|
|
| 169 |
|
#46232: In the first ant example the name of the target ('hello_from_ant') does not correspond with the default target name ('hello'), so calling 'ant' without an explicit target argument won't work. Just rename the target to 'hello' or the default to 'hello_from_ant'.--Christian Brensing #46232: In the first ant example the name of the target ('hello_from_ant') does not correspond with the default target name ('hello'), so calling 'ant ...more...
|
B8.0
13-Jan-11
|
|
| 226 |
|
#46195: I have had a great deal of trouble getting JTestR to work for my project. With the config from the book (0.6) I get:
[INFO] Internal error in the plugin manager executing goal 'org.jtestr:jtestr:0.6:test': Unable to load the mojo 'org.jtestr:jtestr:0.6:test' in the plugin 'org.jtestr:jtestr'. A required class is missing: org/jruby/exceptions/RaiseException
Is this something that could be easily avoided with a couple lines of clarification?--Todd #46195: I have had a great deal of trouble getting JTestR to work for my project. With the config from the book (0.6) I get:
[INFO] Internal error ...more...
|
B8.0
06-Jan-11
|
|
| 243 |
|
#45843: Last line "Next install the Monkeybars gem..." would read better if it were in a new paragraph. At the moment, this gives the impression it's a netbeans step. Probably this is made worse by the fact the gem install spans a page break.--Adrian Mowat #45843: Last line "Next install the Monkeybars gem..." would read better if it were in a new paragraph. At the moment, this gives the impression it's ...more...
|
B7.0
01-Dec-10
|
|