By Developers, For Developers

Historical errata for Deploying Rails Applications

PDF PgPaper PgTypeDescriptionFixed onComments
60TYPO

Fix capital H here: “THe recipes in this chapter….”

2007-10-30
60SUGGEST

Any chance of having Capistrano 2.0 covered for the final book?

2007-10-30
10SUGGEST

I would suggest “real estate agent” in place of “realtor”. It seems I can’t add a link, but search Wikipedia for “Realtor” then go to the “Word as colloquialism” section.

2007-10-30
45SUGGEST

It would be good to warn readers that the jump from VPS to dedicated servers is really quite a large increase in responsibility. Dedicated servers are typically built from cheaper hardware than shared or VPS boxes (unless you specify otherwise when ordering). If you lose a disk on a shared box or VPS box you’ll probably live (if you even hear about it at all), but if you didn’t spring for RAID on your dedicated box, you’re toast. Additionally, it’ll probably be up to you to restore your data after the drive is replaced.

2007-10-30
101TYPO

Surely you mean, “Voila!”

2007-10-30
30OK
  • You don’t talk about what is required to enable an Apache server with FCGI support (e.g., when you are running your own server). That is where most of the difficulty is. It would be good to at least show the Apache config file with FCGI enabled so one can see what it should look like.

(Bruce says:
not fixed (we chose to emphasize mongrel over fcgi))

  • You don’t mention how to configure Apache as the front end proxy to Mongrel (so you can still use Apache’s extensive authorization and authentication systems). This configuration provides the best of both worlds. The Apache configuration is not difficult but to those not familiar with mod_proxy and mod_rewrite, getting it setup can be difficult.

(Bruce says: later chapter)

  • You also don’t show a typical Mongrel or lighttpd server configuration file.

The items above are the kind of things I expected to see (along with an in-depth discussion on Capistrano) in a book on Rails deployment. These areas are where a good deal of questions show up in the community. Simply telling someone to use a commercial hosting provider only sidesteps one of the most important deployment issues. Please consider adding more details on the items in section 2.7.

(Bruce says: later chapter)

  • How about adding a Capistrano cheatsheet as the add-in card in the book?
2007-10-30
104TYPO

NGinix should read nginx (note the case and the single “i”). Same goes for pages 45, 53, and 127.

2007-10-30
21TYPO

“broweser” should be “browser”

2007-10-30
22TYPO

“Usually, you’ll won’t even need to install anything.” should be “Usually, you won’t even need to install anything.”

2007-10-30
45TYPO

“and an spacious hard drive” should be “and a spacious hard drive”

2007-10-30
51TYPO

Some of the markup code is showing:
ezra$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz

Now, unpack, build and install Ruby.


<![CDATA[
ezra$ tar -xvfz ruby-1.8.6.tar.gz
…
ezra$ cd ruby-1.8.6
ezra$ ./configure && make && sudo make install
…
]]>

2007-10-30
21TYPO

propOgate, propOgated should be spelled as propAgate, propAgated. Several places throughout the book.

2007-10-30
58TYPO

“sever” -> “server”

2007-10-30
61TYPO

“sever” -> “server”

2007-10-30
61TYPO

“an Subversion” -> “a Subversion”

2007-10-30
12TYPO

“Moving In: Capistrano After” is grammatically odd with the “Capistrano” word, perhaps “Moving In: Capistrano. After”?

2007-10-30
13TYPO

“Doing Windows Homeowners hate doing windows.” Missing the ‘:’ separator “Doing Windows: Homeowners…”

2007-10-30
15SUGGEST

“US$100” seems quite odd to myself and a few friends. Wouldn’t this be better as “$100 USD”? You use this scheme several other places as well.

2007-10-30
17SUGGEST

The continuation “on the following page.” is a bit odd since it is on the following page! It might be best to just remove “on the following page.” Fig. 2.1 is explicit enough.

2007-10-30
19OK

“Both features were in Rails 1.1 and were stable enough to use until Rails 1.1 was released officially.”

Missing the NOT:

“Both features were in Rails 1.1 and were NOT stable enough to use until Rails 1.1 was released officially.”

Also you might also want to specify “in production”

“not stable enough to use IN PRODUCTION until”

(Bruce says: the book was right as it was)

2007-10-30
20SUGGEST

“Good Rails pro-grammers will know who the good vendors are.”

It might be worth mentioning somewhere that they can hop on irc to ask around.

(Or you can specify that they should go to #merb and ask you your opinion ;) jk)

2007-10-30
8TYPO

Sometimes you’re coining AR as “Active Record”, sometimes as “ActiveRecord”. The other Pragmatic Rails books mostly use “Active Record”, so that’d be nice for the sake of consistency. Page 8 contains the first occurance I found.

2007-10-30
9TYPO

The official spellings are “Basecamp” (note the cap) and “43 Things” (note the space).

2007-10-30
12TYPO

“Ngnix” should read “nginx”.

2007-10-30
16TYPO

The exclamation mark in " (I am much happier now that I am on the sending end of those bills)!" is misplaced and should come before the closing paranthesis.

2007-10-30
17SUGGEST

Indeed Ruby 1.8.6 can run Rails 1.2, and so can versions 1.8.2, 1.8.4, and 1.8.5. In fact, the latter is the officially recommended one as of this writing. Having said that, it might be a bit harsh to require Ruby 1.8.6 support at the hosting company’s end as that version isn’t officially packaged yet for many of the operating systems and distributions that they run.

2007-10-30
20SUGGEST

And adding to that previous comment: the Ruby forums and wiki contain a host of information as well.

2007-10-30
21ERROR

“The domain registrar who sold you your name will give you a web
page to configure your DNS settings.” Most do, but not all. At the very least they will let you know how you can configure your DNS settings — even when that means sending an e-mail to your registrar’s support team.

2007-10-30
22TYPO

“Putty” should read “PuTTY”, and a footnote containing a link to its website should come in handy.

2007-10-30
25TYPO

“Cuteftp” should read “CuteFTP”, and I reckon that PureFTPd comes in a server version only. In the free client department, SmartFTP or FileZilla are choices I’ve often seen used in practice.

2007-10-30
27TYPO

“ruby” should read “Ruby”.

2007-10-30
28TYPO

“ruby” should read “Ruby”.

2007-10-30
30TYPO

You’re sometimes calling FCGI just that, and sometimes spelling it out as FastCGI. For reasons of consistency it may be proper to stick to a single convention.

2007-10-30
33TYPO

“Webrick” should read “WEBrick”.

2007-10-30
34TYPO

“On, Unix-based systems” should read “On Unix-based systems”.

2007-10-30
36TYPO

“Darwinports” is now called “MacPorts”.

2007-10-30
37SUGGEST

The novice Unix user would probably appreciate the meaning of “shebang” :-)

2007-10-30
37SUGGEST

After creating the migration for the Active Record session store, you will also need to enable it in environment.rb. Mentioning why you should be using this session store (i.e. increased performance and scalability) would also be helpful.

2007-10-30
42OK

A Solaris zone is also a common VM option.

2007-10-30
43TYPO

“linux” should read “Linux”.

2007-10-30
44TYPO

“Fast-CGI” should read “FastCGI”.

2007-10-30
44TYPO

“Maphisto” should read “Mephisto”.

2007-10-30
44TYPO

“Lighttpd” should read “lighttpd” like in earlier references to that web server in the book.

2007-10-30
44OK

“Primarily, you want a distribution with a minimal footprint.” I am wondering the extent to which this is logical or relevant. First question that comes to mind for the average developer is: how can I find out about that footprint? Then secondly the data he’d get might not be all that relevant: most hosting companies do cut down on unnecessary daemons to minimize memory usage — after all, they can squeeze more VPS’s on a single box that way.

2007-10-30
45TYPO

“rails” should read “Rails”.

2007-10-30
45TYPO

“Mb” should read “MB”.

2007-10-30
46TYPO

“linux” should read “Linux” and “Putty” should read “PuTTY”. The link you provided here would also be valuable in your earlier reference to PuTTY. (Nitpicking any further :-) is PuTTY truly the “de facto” standard? What about SecureCRT and other commercial offerings?)

2007-10-30
46SUGGEST

While Dapper Drake offers long term support and that makes it an appealing choice as a server platform, it’s also true that it doesn’t offer packages for Apache 2.2 or nginx which makes it a poor choice for continuous support. Compiling from source is one thing, but for a company or developer that doesn’t make a business out of hosting it’s a suboptimal choice. Feisty Fawn might then be a better option and does offer Apache 2.2 out of the box.

2007-10-30
47TYPO

GCC stands for GNU Compiler Collection, not Gnu C Compiler.

2007-10-30
47TYPO

“the most popular Rails database”: technically, it should read “the most popular Rails database management server” or at least “database server”.

2007-10-30
47TYPO

“Rmagick” should read “RMagick”.

2007-10-30
47TYPO

“Lighttd” should read “lighttpd” (note the case and letter “p”).

2007-10-30
52TYPO

The latest RubyGems version is 0.9.4.

2007-10-30
53TYPO

“rubygems” should read “RubyGems”.

2007-10-30
54ERROR

“I’m going to walk you through installing Nginx and FastCGI
as well, because you’ll need them if you want to use Nginx for load
balancing and static content.” nginx doesn’t require FastCGI for that purpose and can proxy balance upstream Mongrels just like Apache 2.2’s mod_proxy_balancer can.

2007-10-30
57TYPO

“ok” should probably read “OK”.

2007-10-30
59TYPO

“37 Signals” should read “37signals”.

2007-10-30
59TYPO

“Switch Tower” should read “SwitchTower”.

2007-10-30
60TYPO

“NET::SFTP” should read “Net::SFTP”.

2007-10-30
61TYPO

“37 Signals” should read “37signals”.

2007-10-30
64SUGGEST

It may be worth adding that termios isn’t readily available for Windows.

2007-10-30
65TYPO

“rake” should read “Rake”.

2007-10-30
66TYPO

It’s the database thang ;) or more precisely “database management server” or “database server”. I’ll now quit my pestering about this :)

2007-10-30
67TYPO

“ReWrite directive” should read “Rewrite directive”.

2007-10-30
71SUGGEST

“leaves five versions” may more precisely read “leaves the five latest versions”.

2007-10-30
72TYPO

“rake” should read “Rake”.

2007-10-30
74OK

“Most Rails developers now use :export instead” but really, there’s nothing wrong with using checkout as long as you don’t forget to secure the .svn directories in the web server configuration lest the entire source code will be available publicly.

2007-10-30
80TYPO

The markup of FastCGI doesn’t match the markup elsewhere in the book.

2007-10-30
85TYPO

“intemidating” should read “intimidating”.

2007-10-30
86SUGGEST

Even better than manually updating the schema info is using the transactional_migration plugin. It has saved me a ton of deployment troubles.

2007-10-30
91TYPO

“reaload” should read “reload”.

2007-10-30
93TYPO

“linux” should read “Linux”.

2007-10-30
95TYPO

That <![CDATA[ probably shouldn’t be displayed.

2007-10-30
96TYPO

So is it FCGI or FastCGI?

2007-10-30
97TYPO

“5.3, The Reaper” misses an ending period.

2007-10-30
106TYPO

“Kb” should read “KB”.

2007-10-30
108SUGGEST

I’ve found it easier to call the sample database YAML file “database.sample.yml” than “database.yml.sample” so that more editors pick it up for syntax highlighting.

2007-10-30
109TYPO

“teh server” should read “the server”.

2007-10-30
109TYPO

“ok” should probably read “OK”.

2007-10-30
114TYPO

Is it a Gem or a gem? :-)

2007-10-30
115SUGGEST

Rick Olson’s gems plugin at svn.techno-weenie.net/projects/plugins/gems offers a great set of functionality to ease managing gems.

2007-10-30
116TYPO

“. When” The prefixing period and space are incorrect.

2007-10-30
118TYPO

“ALTER TABLE>” the greater than sign is incorrect.

2007-10-30
128TYPO

“framework.Do” A space is missing after the period.

2007-10-30
129TYPO

The first two bullet points miss a closing period after their first sentence.

2007-10-30
130OK

Turning off sessions would provide for an even faster baseline, and then allow a developer to toggle between the various session stores and gauge their performance impact.

2007-10-30
130TYPO

“rails” should read “Rails”.

2007-10-30
132TYPO

“2Ghz Intel core duo with 2 gigs of ram” should read “2 GHz Intel Core Duo with 2 gigs of RAM”. “Mb” should read “MB”.

2007-10-30
134TYPO

“Apache2.2, Lighttpd or Nginx” should read “Apache 2.2, lighttpd, or nginx”.

2007-10-30
92SUGGEST

The “god” project over at god.rubyforge.org aims to be a compelling alternative to monit that’s written in Ruby. Perhaps that’s an interesting one to cover?

2007-10-30
23ERROR

When granting the database privileges, shouldn’t you add ALTER so that later migrations can add columns, indexes, etc. to tables created in earlier migrations?

2007-10-30
65SUGGEST

Perhaps you might want to go into detail about Roles and the deploy.rb. You definitely rush through this important bit. For those of us completely new to Capistrano who bought your book for this very topic, you don’t cover it in enough detail. Also try to cover details related to altering the file for a shared hosting scenario..or a non-Mongrel setup. So far, I’m REALLY let down by this section.

2007-10-30
22TYPO

The first sentence after the “Document Root and SSH” heading, you have repeated “to need”.

2007-10-30
91TYPO

in the second paragraph after the “Configuring a Cluster” heading, second sentence, you have repeated “the” at, “… different from the the port option”.

2007-10-30
25TYPO

In the paragraph after the “Creating a Starter Application” heading, at the end of the third sentence you have, “… at time same time.” I think you meant to say, “… at the same time.”

2007-10-30
45TYPO

In the 4th paragraph, at the end of the first sentence, you have, “… want to consider us ing Xen.” I believe you meant “using” instead of “us ing”

2007-10-30
51TYPO

In the first paragraph, first sentence, you have repeated the word “do”.

2007-10-30
53TYPO

In the first paragraph after the “Install MySQL” heading, first sentence, you have repeated the word “and”.

2007-10-30
68TYPO

In the first paragraph after the “Run the setup and deploy Tasks” heading, first sentence, you have, “… Capistrano needs to create the a few directories …”. remove the word “the”.

2007-10-30
73TYPO

The first sentence on the page ends, “… excellent online documentation online.” You should remove one of the “online”s.

2007-10-30
91TYPO

In the description of the INT signal, you have repeated “is used”

2007-10-30
101TYPO

In the last sentence of the first paragraph, you have, “… a the contents of the session …”. Remove the “a”.

2007-10-30
115TYPO

In the third paragraph, second sentence, you have, “… you also need to copy the it’s license …”. You need to get rid of “the” or “it’s”.

2007-10-30
116TYPO

In the second paragraph after the “Freeze the Rails Gems” heading, first sentence, you have, “… he have finally recovered …”. The word “have” should be “has”.

2007-10-30
118TYPO

In the “Branches are tough to manage” bullet point, you have, “… until it is table …”. The word “table” should be “stable”.

2007-10-30
43OK

“Products like Virtuozzo and OpenVZ are a few to watch out for.”

This sentence appears in the Memory section and, as is, has little relevance. Why should I watch out for these products? What should I do if I find them? The admonishment to “watch out for” something is used both positively and negatively, at least in my region.

2007-10-30
65ERROR

Capistrano 2.0 has now been released. “cap —apply-to .” does not work for me as the new command is “capify .”

2007-10-30
63ERROR

Capistrano 2.0 is now the default version installed by gem.

2007-10-30
110ERROR

Setting svn:executable on Windows should omit the initial “*” parameter to work correctly.

2007-10-30
28TYPO

First paragraph on the page, “configurion” instead of “configuration”

2007-10-30
45TYPO

3rd PP: “cost more then VPS systems” should read “cost more than VPS systems”

2007-10-30
45SUGGEST

3rd PP: “A starter VPS can run you […] per month. Whereas a starter dedicated box […]” would read better as “[…] per month, whereas”

2007-10-30
58SUGGEST

I am a big fan of all the authors, but I’d like to delicately suggest that the section on Capistrano be rewritten to focus on Capistrano 2. This is the danger in having a book whose publish date keeps slipping, I’m sure — you have to keep rewriting it. But my opinion is that there are already many books that cover Capistrano 1, none as yet cover Capistrano 2 and you have the perfect opportunity to do so.

2007-10-30
44OK

Please add a section on setting up an Amazon EC2 image and deploying your Rails app to it. You may need to mention Amazon S3 for persistent storage and provide examples. Talk about how to scale up to multiple EC2 images.

2007-10-30
50ERROR

‘Fix that by editing the /etc/apt/source.list file’ should read ‘Fix that by editing the /etc/apt/sources.list file’. There’s an ‘s’ missing from sources.

2007-10-30
1SUGGEST

The configuration of document root really needs to be explained further as well as the integration of Apache and Mongrel. You say you can use Mongrel instead of Apache, but from what I’ve read, they have to work together. It needs to be explained in detail…it’s the whole reason I bought this book. Everything else can be found on the net easily.

(Bruce says: enhanced description of document root; later chapters)

2007-10-30
11TYPO

“Finding a Starter Home: Shared Hosting Not everyone can af ford a house” - Between ‘Hosting’ & ‘Not’. This is also on the following paras, first line.

2007-10-30
66SUGGEST

Often I am confused about the use of Apache or Nginx. Sometimes it’s not so clear. This page mentions only Apache as an example web server but the step-by-step guide uses Nginx. Perhaps a clarification somewhere about the difference and usage between Apache and Nginx would help. At present it’s a bit schizophrenic.

2007-10-30
93SUGGEST

Monit rocks but it may be helpful to list some things that it depends on. on RHEL I needed to install flex bison and byacc. I know it is impossible to cover how to install it for all systems but it may be good to give a few more details.

2007-10-30
97ERROR

Your “index” (no index yet) suggests the book home page on books.pragprog.com as the place to get source code. I can’t find any source at that URL, just the erratum page. The discussion of the Reaper on p. 97 describes the Reaper script. Presumably the source for this script is in your online source code archive (see above). It would be nice to include Reaper source in the book as well, since it sounds so critical to making FastCGI behave.

2007-10-30
1SUGGEST

I bought DRA (this book) to learn how to deploy an in-house Rails program on my day-to-day desktop Mac.

(Bruce says: We won’t handle desktop deployments at all)

I need to limit access to those on our internal network, i.e., IP addresses starting with 192.168. I THINK I need to use Apache to get this restriction.

Apache is well documented elsewhere, but it’s a huge program with zillions of settings. I found it hard to locate good documentation on LightTPD and nginix. This book assumes one knows all about these three web servers, but that’s why I bought the DRA book. I’d greatly appreciate pointers on their use in deploying Rails on various machines. What are the best sources of additional information?

The largely cookbook approach in this version of the DRA book means it’s of limited use in situations like mine that don’t fit the norm of a remote server.

(Bruce says: later chapters)

2007-10-30
105SUGGEST

I have a virtual Windows 2003 server set up, and have installed Apache 2.2, and Mongrel. I have alse set up a svn repository for my application on the server. Full access to everything. Works with static pages from the /public directory. It would be nice if you also could suggest how to deploy applications in such an environment.

2007-10-30
85SUGGEST

Cap 2.0 deprecates the use of “Capistrano.configuration”. Instead, it recommends using “Capistrano::Configuration.instance”. I guess it depends if you are trying to target Cap 2.0… (please do! documentation the Web is scattered, I hope your book can pull it together.)

2007-10-30
51TYPO

Second last line ‘thru’

2007-10-30
23ERROR

The GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP command should include INDEX permission since it is commonly used by migrations.

Should be: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX

2007-10-30
48TYPO

In the following section the line root# adduser ezra is incorrectly marked as a comment I believe:

If all is well, create your normal user account:
root# adduser ezra
Adding user ‘ezra’…

2007-10-30
49TYPO

Again, here part of the line root# visudo is marked as a comment where it shouldn’t, I think this is a structural problem throughout the book. The problem is that root access is always indicated as root#, apparently everything after that is marked as a comment and turns green.

Now edit /etc/sudoers. You should use a program called visudo to edit
the sudoers file as visudo won’t let two people edit at the same time.

root# visudo

2007-10-30
45TYPO

Last Para: “This all well tread territory” is bad grammar and would read better as “This is all well traveled territory”

2007-10-30
109TYPO

In the ‘Joe Asks…’ box:

• You can leave the database.yml file on teh server in the
shared. You can then create a symlink to that file. It’s best to create this symlink in an after_update_code task.

First, I believe it should be ‘the’ not ‘teh.’
Second, what is the ‘shared’ that I can leave ‘it’ in?

2007-10-30
92TYPO

Last Para: Last Sentence: should read “to restart Apache” instead of “restarting Apache”.

2007-10-30
21SUGGEST

Just fyi, I tried instantdomainsearch… neat idea, but it didn’t quite work. The results were for the domain I typed, minus the last letter. It’s likely that the requests responded out of order.

2007-10-30
89TYPO

Place footnote marks outside the period.

2007-10-30
99TYPO

Place footnote mark outside of period.

2007-10-30
125TYPO

In the code example “friend_names = person.friends.collect {|friend| friend.address.street }" the variable is named "friend_names” but the collect statement is compiling an array containing the street address of each friend. I think you mean to either name the variable something like “@friend_street_addresses” or have the statement in the block read “friend.name”

2007-10-30
114TYPO

Shouldn’t the sentence “Just add the –svn flag.” read “Just add the —svn flag.” with TWO dashes?

2007-10-30
252TYPO

In the second full paragraph, the option line extends far to the right of the margin.

“Normally, you’ll configure your caching options in one of your environ-
ments, typicallyconfig/environments/production.rb. Add the option lineconfig.action_controller.perform_
= true. You don’t usually want to …”

Was the “config.action_controller.…” supposed to be in its own block?

2008-04-10
254TYPO

9.6 Conclusion, second paragraph:
“I could use the same technique to ran an application…”.sub(‘ran’,‘run’)

2008-04-10
227TYPO

The sidebar gets cut off by the footer and ultimately by the end of page:
“best practices and possibly even hacking on Rails to either
modify it or work around it. However you may find your-
—footer begins here—
self using the framework in ways that the Rails designers
never intended, so when it comes time to upgrade Rails
to the next version or make use of a plugin that assumes ”
…assumes what?

2008-04-10
230SUGGEST

Inline switch to code font looses spacing: ‘arender’
First full paragraph:
“… that just does arender :text => ”Hello!“.”

2008-04-10
103SUGGEST

“To make things work smoothly, you need to login to Subversion at least once from the remote server so the remote server’s Subversion client caches your username and password.”

At first reading this seems to conflict with the previous section about setting up :scm_username and :scm_password in the cap recipe.

As far as I can tell from testing, :scm_username and :scm_password are used for checkouts on the local workstation only, but this could be made clearer.

In any case, if you are happy to cache the SVN username and password on the target servers, which are exposed to the Internet, then surely you’d be happy to cache them on your workstation too? Perhaps capistrano doesn’t support this.

Conversely, if you must be prompted for a local scm_username and scm_password every time, you’d probably want these passed to the target servers too, where they would do

svn —username foo —password bar —no-auth-cache export …

to retrieve the source code but avoid caching the password.

You do say that capistrano is opinionated software. However if this is a design limitation of capistrano (i.e. that the SVN passwords must be cached on the target servers, but cannot be cached on the local workstation), then I’d like it to be made clearer. I’m still headscratching around this issue myself :-)

2008-04-10
130ERROR

Mongrel cluster commands written are old style (no longer work?). See:

$ mongrel_rails help
Usage: mongrel_rails [options]
Available commands are:

- cluster::configure
- cluster::restart
- cluster::start
- cluster::status
- cluster::stop
- restart
- start
- stop

2008-04-10
31SUGGEST

“To prevent this unfortunate circumstance from happening to you, copy each dependency to vendor. Unpack each gem to vendor like this…”

Edge Rails has now introduced a supported way to freeze gems:

[from railties/CHANGELOG]

# Unpack specified gem to vendor/gems/gem_name-x.x.x
rake gems:unpack GEM=bj

So even if running 2.0.2 or earlier, it would be a good idea to standardise on vendor/gems/gem_name-x.x.x/lib, which you can do like this:

mkdir vendor/gems
cd vendor/gems
gem unpack bj

(although prior to 2.0.3 you will have to update $LOAD_PATH yourself)

2008-04-10
133SUGGEST

Note that for monit-5.0 (not yet released):
“if cpu is greater than 80% …”
changes to
“if totalcpu is greater than 80% …”

See cvs.savannah.gnu.org/viewvc/monit/monit/CHANGES.txt?revision=1.400&view=markup

2008-04-10
160TYPO

7.6 second sentence. Apache also has and an official 501©(3) nonprofit

2008-04-10
107SUGGEST

The description of deploy:rollback says “revert to previous migration manually.” It would be more helpful to describe the task or script that accomplishes the database rollback.

2008-04-10
146TYPO

5th line:
problem is thecity center itself

2008-04-10
148TYPO

In the Figure 7.1 you have 3 servers and in green boxes: VHost, V Host and V Host.

2008-04-10
149TYPO

I’m not sure about it, but on Figure 7.2 there are two white boxes for physical machines, and both of them are named “Physical machine 1”.

2008-04-10
156TYPO

The one before last line: “I’ve dedicated a full section to it below inSection 7.8”

2008-04-10
164TYPO

Last paragraph (just before config code):
“use to do that *ishttp_proxy_conf:”

2008-04-10
165TYPO

First paragraph (after config code):
The first three lines, ServerAdmin andServerAlias, (…)"

The same paragraph, one line before last:
relevant CNAME records in *theServerAlias. (…)"

Fourth paragraph, second line:
“I’ll put this configuration in a file calledhttps_proxy.conf. (…)”

2008-04-10
166TYPO

Last paragraph, first line:
“But there is good news. But luckily(…)”

2008-04-10
168ERROR

On Debian/Ubuntu Apache’s init script is:
/etc/init.d/apache2

2008-04-10
170TYPO

Fourth paragraph (begining: These two valeus…), second line:
“Apache configuration file we’ll deal with, ismongrel_proxy.conf.”

2008-04-10
173TYPO

7.7, first parapgraph, first line:
“NGinx(pronounced engine-x) (…)” - there should be a space after Nginx.

2008-04-10
173TYPO

NGinx or Nginx? ;-) It also occurs on other pages.

2008-04-10
187TYPO

Multi-Master, Read/Write Clustering, second paragraph, 4th line:
“it might alrady be there (…)”

2008-04-10
189TYPO

Configuring Your Application for the Multi-Master Cluster, second paragraph, 5th line: (missing period ath the end of sentence)
“(…) perhaps without even knowing it * * One of my favourite (…)”

2008-04-10
189TYPO

3rd line from end:
“their overall experienced is improved.”
Should be experience

2008-04-10
24ERROR

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

19TYPO

“>>>>>>> .r32877”

Spurious leftover from svn merge?

27TYPO

“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 :-)

30ERROR

$ cap deploy_with_migrations

should read:

$ cap deploy:migrations

133ERROR

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

119SUGGEST

“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.

176TYPO

Space missing: or/foo in 3rd paragraph.

85ERROR

root# sudo gem install rails —no-rdoc —no-ri

Is sudo actually needed? We are already root…

190TYPO

“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.

25ERROR

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.

170SUGGEST

I’d also include the MIME types application/xml application/xhtml+xml text/javascript text/css for the DEFLATE section.

128TYPO

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

121SUGGEST

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.”

143SUGGEST

The use of mongrel introduces an issue with multiple processes writing to the log file. It would be helpful to describe configuration of syslog.

83SUGGEST

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?

23ERROR

“We use svn import with the —force option…” does not match up with any code snippet.

25ERROR

“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.

38TYPO

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.”

21TYPO

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

35ERROR

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.

22SUGGEST

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.

83ERROR

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).

83SUGGEST

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

84SUGGEST

You mention that you should have ruby 1.8.6 or higher, but the command output shows 1.8.4.

86TYPO

You mention the include-dependencies option but don’t use it in the example.

86TYPO

The formatting for line continuation is messed up here and elsewhere in the book.

87ERROR

zliblg was already installed in an earlier step.

23TYPO

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).

28ERROR

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

177ERROR

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.

92TYPO

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.

104SUGGEST

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.

249TYPO

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?

250TYPO

“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.”

88ERROR

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.

39ERROR

“Rails is a dynamic, interpreted language.” Rails is the framework not the language.

195ERROR

pen -f 80 localhost:80 produces an error:
Number of simultaneous connections to (sic) large.
Maximum is 27, or re-build pen with larger FD_SETSIZE

Not sure what the cure is? (Yet!)

24ERROR

The command:
svn mkdir db/migrate tmp
doesn’t work on my server because there is no ‘db’ directory yet.
svn: Can’t create directory ‘db/migrate’: No such file or directory

I have to first do:
svn mkdir db
and then I can do the full command

148SUGGEST

DBAs in my company (who fortunately do not run my stuff), claim that async multi-master is not a supported configuration for MySQL. I did setup this way, and the result was that some data (particularly DELETEs) did not propogate, and we have no way to effectively LOCK any rows for update, so this requires some application rewriting.

71TYPO

Sorry, Please ignore my previous error post
i mistype Guess with guess

thanks
Ami

82ERROR

On my freshly installed Ubuntu server, the command (ran as root)
/etc/init.d/sshd reload
produced :
-su: /etc/init.d/sshd: No such file or directory

but then I tried (also as root):
/etc/init.d/ssh reload
which in turn produced the better looking:
* Reloading OpenBSD Secure Shell server’s configuration sshd
…done.

not sure what’s going on but I’m sure you guys will figure out :)
Love the book so far !

CharlCharlERROR

��������
,

eMLvRFHJvfERROR

Real brain power on display. Thanks for that awnser!

Categories: