如何在Heroku上重新启动rails服务器?

编程入门 行业动态 更新时间:2024-10-28 13:14:24
本文介绍了如何在Heroku上重新启动rails服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我如何对heroku上的应用程序执行同样的操作?

Locally I just interrupt (ctrl-c) and then start it again.

在本地我只是中断(ctrl-c),然后再次启动。

How do I do the same thing with an app on heroku?

推荐答案

答案是:

The answer was:

heroku restart -a app_name # The -a is the same as --app

轻松使用替换别名hra ='heroku restart --app' 您可以通过将其添加到.bashrc或.bash_aliases文件如下所述: https:// askubuntu / questions / 17536 / how-do-i-create-a-permanent-bash-alias 和 创建永久可执行的别名 然后你可以输入 hra app_name

您可以重新启动特定的远程设备,例如暂存:

You can restart a specific remote, e.g. "staging" with:

heroku restart -a app_name -r remote_name

或者,如果您位于rails应用程序的根目录中,则可以键入

Alternatively if you are in the root directory of your rails application you can just type

heroku restart

重新启动该应用,并且您可以创建一个简单的别名与

to restart that app and and you can create an easy alias for that with

alias hr='heroku restart'`

您可以将这些别名放入 .bashrc 文件或(首选)放入 .bash_aliases 从 .bashrc

You can place these aliases in your .bashrc file or (preferred) in a .bash_aliases file which is called from .bashrc

更多推荐

如何在Heroku上重新启动rails服务器?

本文发布于:2023-06-10 22:57:52,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重新启动   服务器   如何在   Heroku   rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!