使用“rails server"后如何使用相同的终端窗口命令? [英] How to use same terminal window after using "rails server" command?

查看:9
本文介绍了使用“rails server"后如何使用相同的终端窗口命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这是我的问题.我输入rails s",然后我的终端不会让我输入任何命令.所以我必须启动一个新的终端窗口,这很烦人.

Okay here's my problem. I type in "rails s" and then my terminal won't let me type in any commands. So I have to start a new terminal window, which is pretty annoying.

另一方面,我可以输入分离的rails s -d",然后在需要时停止服务器很痛苦.(而不是使用 control+c,我必须找到 PID 并使用 kill -9 PID)

On the other hand I can type in "rails s -d" which detaches, and then it's a pain to stop the server when I need to. (Instead of using control+c, I have to find the PID and use kill -9 PID)

我不是专业人士,所以如果有人有任何建议,将不胜感激,谢谢!

I'm not a professional, so if anyone has any advice it would be much appreciated, thank you!

推荐答案

我不相信有一种方法可以完成您特别要求的事情.

I don't believe there is a way to do the thing you are specifically asking for.

但是,我使用 Iterm2 它允许我在一个窗口中打开多个终端窗口,通过拆分 iTerm2 窗口或创建多个选项卡.这样我就可以让装有 rails 服务器的终端和我的 development.log 尾部变得非常小,除非它们中发生了一些有趣的事情.

However, I use Iterm2 which allows me to open multiple terminal windows in one window, either by splitting my iTerm2 window or by creating multiple tabs. That way I can just make the terminals that are holding rails server and my development.log tail very small unless something interesting happens in them.

这篇关于使用“rails server"后如何使用相同的终端窗口命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆