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 3 months 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 |
| 19 |
|
#31639: ">>>>>>> .r32877"
Spurious leftover from svn merge?--Brian Candler
|
B4.0
11-Apr-08
|
|
|
21 |
#32303: at the bottom of the page, i think the URLs shown for the trunk and the branch should include "svn" rather than "deployit":
svn copy --message="Create the stable branch"
file:///home/ezra/svn/trunk
file:///home/ezra/svn/branches/stable
#32303: at the bottom of the page, i think the URLs shown for the trunk and the branch should include "svn" rather than "deployit":
svn copy --mess ...more...
|
P1.0
07-Jun-08
|
|
|
22 |
#32307: In the merging stable branches section at the top of page 22 in the paper edition of the book, there is a directory path context switch that could use an explanation.
The command on the page (plus the two subsequent ones on page 22):
$ svn merge --revision 422:426 file:///home/ezra/deployit/trunk .
This command should be run from the branches/stable directory path, not from the trunk.
I'm not sure how many people follow the commands step-by-step, but this part could be made more clear. --Henry #32307: In the merging stable branches section at the top of page 22 in the paper edition of the book, there is a directory path context switch that c ...more...
|
P1.0
07-Jun-08
|
|
| 23 |
|
#33801: The code block given for creating the initial SVN directories is misleading. It reads:
$ svn mkdir --message="Initial project layout" ←֓
file:///home/ezra/svn/trunk file:///home/ezra/svn/tags ←֓
file:///home/ezra/svn/branches
Committed revision 1.
In the book, the first line is in red, while the remaining three lines are in blue, indicating that I should type in the first line and the blue lines are my output. However, entering the first line alone causes an error and only if I enter in the first three lines as input does the last line appear as output.
The coloring should be changed to make this clearer (e.g., the first three lines should be red and the last line should be blue).--Chris Bunch #33801: The code block given for creating the initial SVN directories is misleading. It reads:
$ svn mkdir --message="Initial project layout" ←֓
...more...
|
P1.0
08-Aug-08
|
|
| 23 |
|
#32270: "We use svn import with the --force option..." does not match up with any code snippet.
--Wayne Conrad
|
B4.0
04-Jun-08
|
|
| 24 |
|
#31638: The svn mkdir --message "Initial project layout" command is missing the name of the directory that you want to make.
I assume that you want the user to change to /home/ezra/svn, then issue the commands
svn mkdir trunk
svn mkdir tags
svn mkdir branches
But the newbie user would probably have a difficult time knowing this.
Hope this helps,
--Nate--Nathan Neff #31638: The svn mkdir --message "Initial project layout" command is missing the name of the directory that you want to make.
I assume that you want ...more...
|
B4.0
10-Apr-08
|
|
| 25 |
|
#32271: "Database Structure Dumps During Testing: When you run the tests, Rails will dump the development database's structure to db/schema.rb(3)."
It's not apparent what this paragraph is doing here. schema.rb next comes up on page 36. I looked for a command to set a svn:ignore property for db/schema.rb, the perfect reason for this paragraph, but I don't see one.--Wayne Conrad #32271: "Database Structure Dumps During Testing: When you run the tests, Rails will dump the development database's structure to db/schema.rb(3)."
...more...
|
B4.0
04-Jun-08
|
|
| 25 |
|
#31736: Rails 2.0.2 adds the tmp directory as well as tmp/cache tmp/pids tmp/sessions and tmp/sockets. The svn mkdir command errors when using the command specified. --Eric Sendelbach #31736: Rails 2.0.2 adds the tmp directory as well as tmp/cache tmp/pids tmp/sessions and tmp/sockets. The svn mkdir command errors when using the com ...more...
|
B4.0
26-Apr-08
|
|
| 27 |
|
#31640: "I discuss this solution in the (as yet) unwritten sect.vc.deploy.using-capistrano-for-deployingdatabase.yml"
If this is the final beta before publication, you'd better write it soon or else remove this sentence :-)--Brian Candler #31640: "I discuss this solution in the (as yet) unwritten sect.vc.deploy.using-capistrano-for-deployingdatabase.yml"
If this is the final beta bef ...more...
|
B4.0
11-Apr-08
|
|
| 28 |
|
#33859: The command given to create a stable branch doesn't work. The given command is:
$ svn copy --message "Create the stable branch" ←֓
file:///home/ezra/deployit/trunk ←֓
file:///home/ezra/deployit/branches/stable
Committed revision 234.
The problem is that the path /home/ezra/deployit doesn't exist. The command needed to create the stable branch is:
svn copy --message "Create the stable branch" file:///home/ezra/svn/trunk file:///home/ezra/svn/branches/stable--Chris Bunch #33859: The command given to create a stable branch doesn't work. The given command is:
$ svn copy --message "Create the stable branch" ←֓
file:/ ...more...
|
P1.0
10-Aug-08
|
|
| 30 |
|
#31674: $ cap deploy_with_migrations
should read:
$ cap deploy:migrations--sideshow
|
B4.0
16-Apr-08
|
|
|
35 |
#32306: Page 35, under the N+1 Problem:
The code section lists:
friends = Person.find(:all, :conditions => some_friend_connections)
@friend_addresses = person.friends.collect {|friend| friend.address.street}
I believe on the second line, the 'person.friends.collect' should just be 'friends.collect'. The person variable isn't defined in the example (friends is).
This is also in the second example of how to fix the N+1 query with an include statement. --Henry #32306: Page 35, under the N+1 Problem:
The code section lists:
friends = Person.find(:all, :conditions => some_friend_connections)
@friend_add ...more...
|
P1.0
07-Jun-08
|
|
| 38 |
|
#32272: typo:
"has_many()has_one()," should be "has_many(), has one(),"
style:
"belongs_to(), and has_and_belongs_to_many()" doesn't need the comma before "and."
--Wayne Conrad #32272: typo:
"has_many()has_one()," should be "has_many(), has one(),"
style:
"belongs_to(), and has_and_belongs_to_many()" doesn't need th ...more...
|
B4.0
04-Jun-08
|
|
| 83 |
|
#32012: Shouldn't the authme function be
function authme {
ssh $1 -p 8888 ....
}
Just following on from the suggestion above that you should change the default sshd port?--Aditya Sanghi #32012: Shouldn't the authme function be
function authme {
ssh $1 -p 8888 ....
}
Just following on from the suggestion above that you shoul ...more...
|
B4.0
15-May-08
|
|
| 83 |
|
#33429: The authme function will only work if the .ssh directory already exists on the remote server. Also, ssh is very picky about permissions on this directory and the authorized_keys file, so you want to chmod 755 ~/.ssh and chmod 644 ~/.ssh/authorized_keys (if not 600). #33429: The authme function will only work if the .ssh directory already exists on the remote server. Also, ssh is very picky about permissions on th ...more...
|
P1.0
31-Jul-08
|
|
| 83 |
|
#33430: On Ubuntu, and probably other distros, an ssh-agent is started for you when you log into XWindows. You can just call ssh-add. If you call ssh-agent, you will get an error regarding SSH_AUTH_SOCK or something like that.
Also, your commands to start ssh-agent and ssh-add are a little confusing. This is much more straightforward:
$ eval `ssh-agent`
$ ssh-add
#33430: On Ubuntu, and probably other distros, an ssh-agent is started for you when you log into XWindows. You can just call ssh-add. If you call ss ...more...
|
P1.0
31-Jul-08
|
|
| 84 |
|
#33431: You mention that you should have ruby 1.8.6 or higher, but the command output shows 1.8.4.--Sam Umbach
|
P1.0
31-Jul-08
|
|
| 85 |
|
#31702: root# sudo gem install rails --no-rdoc --no-ri
Is sudo actually needed? We are already root...--Hywel Mallett
|
B4.0
23-Apr-08
|
|
| 86 |
|
#33432: You mention the include-dependencies option but don't use it in the example.--Sam Umbach
|
P1.0
31-Jul-08
|
|
| 86 |
|
#33433: The formatting for line continuation is messed up here and elsewhere in the book.--Sam Umbach
|
P1.0
31-Jul-08
|
|
| 87 |
|
#33434: zliblg was already installed in an earlier step.--Sam Umbach
|
P1.0
31-Jul-08
|
|
| 88 |
|
#34348: On page 88 there is a guide of how to install nginx. After installing nginx you need to reboot the system (or something similar). Until then the "nginx" command doesn't exist. I think that should be mentioned.--David Trasbo #34348: On page 88 there is a guide of how to install nginx. After installing nginx you need to reboot the system (or something similar). Until then t ...more...
|
P1.0
05-Sep-08
|
|
| 92 |
|
#33956: The word 'server' is spelled wrong in the sentence:
You simply found the files you needed to copy, and you
used Subversion or FTP to push the whole Rails project directory up to your sever, wholesale.--Chris Bunch #33956: The word 'server' is spelled wrong in the sentence:
You simply found the files you needed to copy, and you
used Subversion or FTP to push ...more...
|
P1.0
13-Aug-08
|
|
| 104 |
|
#34098: On an earlier page you recommend setting scm_username and scm_password, but then you tell the user to cache the subversion credentials. This sends a mixed message. If you're using cached credentials, there is no need to set scm_username/password. Also, I'm not sure if scm_username and svm_password are even used if credentials are already cached.--Sam Umbach #34098: On an earlier page you recommend setting scm_username and scm_password, but then you tell the user to cache the subversion credentials. This ...more...
|
P1.0
17-Aug-08
|
|
| 119 |
|
#31688: "Do a Push Deploy Instead of Pull"
There is a problem with "set :deploy_via, :copy" which caused me a lot of head scratching. SFTP was locking up whenever it connected to my target server.
The solution is to add:
set :synchronous_connect, true
to the recipe. (This is documented in lib/capistrano/configuration/connections.rb if you look really, really hard; the comment is inside a method so it doesn't appear in the rdoc)
Having this hint in the book would have saved me a lot of trouble.
--Brian Candler #31688: "Do a Push Deploy Instead of Pull"
There is a problem with "set :deploy_via, :copy" which caused me a lot of head scratching. SFTP was lock ...more...
|
B4.0
21-Apr-08
|
|
| 121 |
|
#31993: Have you thought about using 'latest_release' instead of 'release_path' for your link_images task? From Capistrano source code: "some tasks, like symlink, need to always point at the latest release, but they can also (occasionally) be called standalone. In the standalone case, the timestamped release_path will be inaccurate, since the directory won't actually exist. This variable lets tasks like symlink work either in the standalone case, or during deployment."--David James #31993: Have you thought about using 'latest_release' instead of 'release_path' for your link_images task? From Capistrano source code: "some tasks, ...more...
|
B4.0
13-May-08
|
|
| 128 |
|
#31922: At the bottom of the page where it talks about starting, restarting and stopping the mongrel clusters, I believe there should be a space between "mongrel_cluster_ctl" and "start" (as well as with "stop" and "restart").
Right now it reads:
mongrel_cluster_ctlstart--Steve Kessler #31922: At the bottom of the page where it talks about starting, restarting and stopping the mongrel clusters, I believe there should be a space betwe ...more...
|
B4.0
07-May-08
|
|
| 133 |
|
#31683: The cap recipes for restarting, stopping and starting via monit don't work as given (seem to hook into the wrong tasks). The following ones do:
namespace :deploy do
desc <<-DESC
Start Mongrel processes on the app server.
DESC
task :start, :roles => :app do
sudo "/usr/bin/monit start all -g #{monit_group}"
end
desc <<-DESC
Restart the Mongrel processes on the app server by
starting and stopping the cluster.
DESC
task :restart, :roles => :app do
sudo "/usr/bin/monit restart all -g #{monit_group}"
end
desc <<-DESC
Stop the Mongrel processes on the app server.
DESC
task :stop, :roles => :app do
sudo "/usr/bin/monit stop all -g #{monit_group}"
end
end
--Brian Candler #31683: The cap recipes for restarting, stopping and starting via monit don't work as given (seem to hook into the wrong tasks). The following ones do ...more...
|
B4.0
18-Apr-08
|
|
| 143 |
|
#32003: The use of mongrel introduces an issue with multiple processes writing to the log file. It would be helpful to describe configuration of syslog.--John Bito
|
B4.0
14-May-08
|
|
| 170 |
|
#31824: I'd also include the MIME types application/xml application/xhtml+xml text/javascript text/css for the DEFLATE section.--Seth Ladd
|
B4.0
29-Apr-08
|
|
| 176 |
|
#31701: Space missing: or/foo in 3rd paragraph.--John Bito
|
B4.0
22-Apr-08
|
|
| 177 |
|
#33932: The bottom of page 177 reads, "When Capistrano deploys Rails apps, Capistrano appends a time stamp to the URL so that clients will think they are new assets and download them again."
Is that true? I don't think so. I couldn't find anything in the cap docs about it, and my deployed static files don't have custom timestamped filenames. Rails definitely appends cachebreaker timestamps to static files (at least it does to JS and CSS), and I am trying to learn more about exactly when it does that. But I don't think cap has anything to do with it.--Adam #33932: The bottom of page 177 reads, "When Capistrano deploys Rails apps, Capistrano appends a time stamp to the URL so that clients will think they ...more...
|
P1.0
11-Aug-08
|
|
| 190 |
|
#31703: "In the next chapter, I’ll dive into some basic performance topics."
The next chapter is Deploying on Windows - Performance is the chapter after that.--Hywel Mallett #31703: "In the next chapter, I’ll dive into some basic performance topics."
The next chapter is Deploying on Windows - Performance is the chapter af ...more...
|
B4.0
23-Apr-08
|
|
| 249 |
|
#34101: The same code is listed for both the view and controller (and it's ERB, so I assume it's the view). What is the appropriate controller code for time-based expiration of cached fragments?--Sam Umbach #34101: The same code is listed for both the view and controller (and it's ERB, so I assume it's the view). What is the appropriate controller code f ...more...
|
P1.0
17-Aug-08
|
|
| 250 |
|
#34102: "If you need to work with cached content in production temporarily, you can just set the appropriate cache option." should be "If you need to work with cached content in __development__ temporarily, you can just set the appropriate cache option."--Sam Umbach #34102: "If you need to work with cached content in production temporarily, you can just set the appropriate cache option." should be "If you need to ...more...
|
P1.0
17-Aug-08
|
|