ddfreyne/nanoc — Issue #86: Stopping the server?
Author: DaveEveritt
Created: 2012-01-22 20:21:34+00:00
State: open

This isn't a bug, but it would be good to know how to stop the server, otherwise (if it's running and I hit `cmd z`, then `nanoc view`) we get:

=== MESSAGE:

Errno::EADDRINUSE: Address already in use - bind(2)

=== COMPILATION STACK:

(empty)

=== BACKTRACE:

0. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog'
1. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:in `initialize'
2. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:in `new'
3. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:in `initialize'
4. /usr/local/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/handler/mongrel.rb:10:in `new'
5. /usr/local/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/handler/mongrel.rb:10:in `run'
6. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/commands/view.rb:55:in `run'
7. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/command.rb:51:in `call'
8. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/error_handler.rb:42:in `handle_while'
9. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
10. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/command.rb:50:in `call'
11. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/command.rb:43:in `call'
12. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/commands/view.rb:14:in `define'
13. /usr/local/lib/ruby/gems/1.8/gems/cri-2.1.0/lib/cri/command.rb:255:in `call'
14. /usr/local/lib/ruby/gems/1.8/gems/cri-2.1.0/lib/cri/command.rb:255:in `run'
15. /usr/local/lib/ruby/gems/1.8/gems/cri-2.1.0/lib/cri/command.rb:272:in `run'
16. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli.rb:40:in `run'
17. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/error_handler.rb:42:in `handle_while'
18. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli/error_handler.rb:23:in `handle_while'
19. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/lib/nanoc3/cli.rb:37:in `run'
20. /usr/local/lib/ruby/gems/1.8/gems/nanoc3-3.2.4/bin/nanoc3:12
21. /usr/local/bin/nanoc3:19:in `load'
22. /usr/local/bin/nanoc3:19

I didn't know the command to stop the server so did `kill %1`, then opened a new terminal window to run the server. Perhaps mention using another window and/or how to stop the server in the tutorial?