我正在做Michael Hartl的Ruby和Rails教程,我刚刚开始使用我的第一个应用程序。我在命令行中键入$ rails server
并得到以下输出:
=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-10-30 20:56:51] INFO WEBrick 1.3.1
[2012-10-30 20:56:51] INFO ruby 1.9.3 (2012-10-12) [x86_64-darwin12.2.0]
[2012-10-30 20:56:51] INFO WEBrick::HTTPServer#start: pid=2205 port=3000
Started GET "/assets/rails.png" for 127.0.0.1 at 2012-10-30 20:57:56 -0400
Connecting to database specified by database.yml
Served asset /rails.png - 200 OK (3ms)
看起来这仍然在运行并且卡住了。本教程的下一步要求通过$ git add
将新的rails项目添加到Git(在您设置Git之后)。我应该在$ rails server
仍在运行时在新的终端窗口中执行此操作吗?
谢谢!
答案 0 :(得分:2)
是的,在服务器运行时会出现“卡住”现象。您需要在新窗口中执行任何进一步的命令。这是您的应用程序显示所必需的。