small medium large xlarge

Errata for Build Awesome Command-Line Applications in Ruby

 

The latest version of the book is P1.0, released over 3 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-Oct-12)
#49968
PDF page: 3
I typed in the code for db_backup_initial.rb. Your instructions say to run it like this: db_backup_initial.rb # => creates big_client_20110103.sql....more...
  • Reported in: P1.0 (19-Oct-12)
#49963
PDF page: 4
Hi. "On UNIX systems, this is done via the first line of code, commonly referred to as the shebang. The shebang starts with a number sign (#), foll...more...
  • Reported in: P1.0 (23-Oct-12)
#49980
PDF page: 20
Link to rdoc for OptionParser at the bottom of the page has changed to: ruby-doc.org/stdlib-1.9.3/libdoc/optparse/rdoc/OptionParser.html#method-i-make...more...
  • Reported in: P1.0 (23-Oct-12)
#49982
PDF page: 20/36

The URL to the documentation of OptionParser#make_switch leads to a 404.
--Aljoscha Marcel Everding

  • Reported in: B5.0 (31-Jan-12)
#48620
PDF page: 21
As currently foratted the following two items can be confusing. the '--blah' version has the dashes split across a line break which is a little hard t...more...
  • Reported in: P1.0 (23-Oct-12)
#49981
PDF page: 22
Re the sample file media.pragprog.com/titles/dccar/code/be_easy_to_use/db_backup/bin/db_backup.rb The sample file contains all three versions of the ...more...
David Copeland says: There is not a straightforward way to provide a better error message. Your options are to include instructive text in the help text or to catch the error raised by OptionParser and do something else. I would agree that neither of these are ideal.
  • Reported in: P1.0 (25-Mar-12)
#48980
PDF page: 26
The command 'gli scaffold to-do new list done' should read 'gli scaffold todo new list done'. If the command is entered as is, you see errors when you...more...
  • Reported in: P1.0 (06-Nov-12)
#50140
PDF page: 26
Not really a great nuisance, but it seems to me that it's hard to make this work on my system with a dash in the command name: (00:10:46) jaws@Feri...more...
  • Reported in: B6.0 (02-Feb-12)
#48636
PDF page: 26
`gli scaffold to-do new list done` creates a to-do directory but the given example output and further example commands are sans hyphen.--Larry Marburg...more...
  • Reported in: P1.0 (23-Oct-12)
#49984
PDF page: 27

davetron5000.github.com/gli/classes/GLI.html leads to 404--Aljoscha Marcel Everding

  • Reported in: P1.0 (19-Mar-12)
#48960
PDF page: 35

First paragraph underneath the code example: "That's all there is too it..."--Misty De Meo

  • Reported in: P1.0 (08-Mar-13)
#50985
PDF page: 36

An easier approach is:

opts.banner += " database_name"

David Copeland says: I prefer to have it explicit as to what we are setting the banner to
  • Reported in: P1.0 (31-Jan-13)
#50627
Paper page: 41
In both the source code and the book, the line for the global option filename should be `flag [:f,:filename]` instead of just `flag :f` The example...more...
  • Reported in: B6.0 (02-Feb-12)
#48637
PDF page: 41
I don't see where the documentation for the global -f flag is added. Back on page 28 the flag itself is added to the todo app and then on page 39 the ...more...
  • Reported in: P1.0 (08-Mar-13)
#50986
PDF page: 45

Type on the first line:

"My default..." should read "By default..."

  • Reported in: P1.0 (14-Apr-12)
#49112
Paper page: 45
In doc-sample be_helpful/db_backup/man/db_backup.1.ronn, under section "## DESCRIPTION", second paragraph (top of page 45): "My default, `db_backup.r...more...
  • Reported in: P1.0 (19-Mar-12)
#48961
PDF page: 57
"Are there any standard error codeS?" sidebar - MacOS X, based as it is on FreeBSD, also includes the sysexits recommendations. Might be useful to men...more...
  • Reported in: P1.0 (13-Jul-12)
#49518
PDF page: 58

if $?.exitstatus & 0b0002

Shouldn't that be: 0b0010 ?
--Eyðun Nielsen

  • Reported in: B6.0 (05-Feb-12)
#48661
PDF page: 59
I'm writing a command line test wrapper that runs a test suite, does some other things and eventually needed to return the status of the tests suite i...more...
  • Reported in: P1.0 (11-Apr-12)
#49096
PDF page: 66
On the example of Format Output One Record per Line, Delimiting Fields: $ todo list 1,Clean kitchen,2011-06-03 13:45, 2,Rake leaves,2011-06-03 17:3...more...
  • Reported in: P1.0 (06-Feb-13)
#50755
Paper page: 67

Last paragraph: "but there's a usability concern here" should be "but there's an usability concern here"--Leonel Santos

  • Reported in: P1.0 (20-Mar-12)
#48968
PDF page: 73

First paragraph doesn't have a close parentheses. (See beginning of paragraph on previous page.)--Misty De Meo

  • Reported in: P1.0 (11-Feb-13)
#50784
Paper page: 73
First paragraph "cronto" should be "cron to" "The second line tells cronto run our" should be "The second line tells cron to run our" --Leonel Sant...more...
  • Reported in: P1.0 (14-Apr-12)
#49113
Paper page: 80
(Beneath the sidebar "ARGF:...", first paragraph: Missing period after "...standard input to the app)" before start of next sentence "In Ruby, the sta...more...
  • Reported in: P1.0 (14-Apr-12)
#49114
Paper page: 114
First sentence, first paragraph (after code example): "You can then view the RDoc be opening..." should read "You can then view the RDoc by opening......more...
  • Reported in: P1.0 (14-Apr-12)
#49115
Paper page: 114
Last paragraph, second-to-last sentence: "This is a great alternative to hosing it yourself,..." should read "This is a great alternative to hosting i...more...
  • Reported in: P1.0 (15-Mar-12)
#48948
PDF page: 121

Code listings don't show the needed require 'aruba/cucumber' in env.rb--David Copeland

  • Reported in: P1.0 (19-Apr-12)
#49151
PDF page: 144

2nd paragraph from bottom. "An alterantive...", should be "alternative".--Aaron Renner

  • Reported in: P1.0 (08-Apr-13)
#51253
PDF page: 165

"it allows you to execute arbitrary Ruby code, one command
and a time."

Should read "...at a time".