安装了ruby-debug,现在让'应用程序从bug开始......'

时间:2010-11-22 05:25:57

标签: ruby-on-rails

当我这样做时,我安装了ruby-debug:

rails server -debugger

我明白了:

Rails 3.0.1 application starting in bugger on ....

为什么会说bugger?

然后在那一行之后,我回到命令提示符,所以它因某种原因停止了?

转到页面显示:

bugger database is not configured

然后,如果我尝试做:

rails server

无法启动:

2010-11-22 00:42:31] INFO  WEBrick 1.3.1
[2010-11-22 00:42:31] INFO  ruby 1.8.7 (2010-08-16) [i686-darwin10.4.0]
[2010-11-22 00:42:31] WARN  TCPServer Error: Address already in use - bind(2)
Exiting
... address already in use

如何杀死进程,不知道如何过滤它。

1 个答案:

答案 0 :(得分:2)

如果要在启动rails服务器时激活调试器,则需要使用选项-u

rails -u server

它是关于帮助信息的解释:

[shingara@maison ]  master  %
 rails server -h                       
 22/11/10 09:34:49 Usage: rails server
 [mongrel, thin, etc] [options]
     -p, --port=port                  Runs Rails on the specified port.
                                      Default: 3000
     -b, --binding=ip                 Binds Rails to the specified ip.
                                      Default: 0.0.0.0
     -c, --config=file                Use custom rackup configuration file
     -d, --daemon                     Make server run as a Daemon.
     -u, --debugger                   Enable ruby-debugging for the server.
     -e, --environment=name           Specifies the environment to run this
 server under
 (test/development/production).
                                      Default: development
     -P, --pid=pid                    Specifies the PID file.
                                      Default: tmp/pids/server.pid

     -h, --help                       Show this help message.