Errata

Capistrano and the Rails Application Lifecycle

Errata for Capistrano and the Rails Application Lifecycle

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 4.4.2
4.4.2. Using script/runner

$ script/runner -e production "Contact.validate_icon"

should be:

$ script/runner -e production "Contact.validate_icons"

Anonymous   
Printed Page 54
Top half of page

The :setup_public_folder task seems awkward. Setting vars and calling
Cap tasks works, but is awkward. Capistrano tasks seem to break down
when they need to pass around a lot of variables, which is why the
Capistrano plugin system is built in.

So a better strategy would be to either monkeypatch Actor and call :copy_and_filter
as a normal method with arguments, or write it as a Capistrano plugin.

module Copier

def copy_and_filter(mode, src, dest, token, value)
# ...
end

end

Capistrano.plugin :copier, Copier

# copier.copy_and_filter(...)

Anonymous   
Printed Page 55
Top of page

The example of the :mongrel_configuration_setup task seems unnecessarily
complicated. The example uses "#{deploy_to}/#{shared_dir}", but the
built-in :shared_path variable already provides the full path to the
shared directory and could be used instead.

To see this, call this task in a Capistrano recipe:

desc "Show vars"
task :show_vars do
[shared_path, current_path].each do |var|
puts var
end
end

=> /u/apps/myapp.com/shared
=> /u/apps/myapp.com/current

Anonymous   
Printed Page 59
Row 17 of table

The default value of :svn is said to be "/opt/local/bin/svn". This is incorrect.

The given path is mentioned as an example in the Capistrano documentation, but this
is not a default. The default is "svn" as seen on line 78 of scm/subversion.rb

Anonymous   
Printed Page 64
Bottom of page

The command references ssth-keygen, but there should be no 't'.

As a side note, why give instructions for copying ssh keys to a remote server?
This would be a great Capistrano task! (See also: deprec gem, which I contribute to).

Anonymous