如何在Heroku上重新启动rails服务器? [英] How to restart a rails server on Heroku?

查看:128
本文介绍了如何在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 .com / 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服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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