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

我如何在heroku上的应用程序上做同样的事情?

推荐答案

答案是:

heroku restart -a app_name

# The -a is the same as --app

Easily aliased with alias hra='heroku restart --app '
Which you can make a permanent alias by adding it to your .bashrc or .bash_aliases file as described at: https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias and
Creating permanent executable aliases
Then you can just type hra app_name

您可以通过以下方式重新启动特定的远程设备,例如"暂存":

heroku restart -a app_name -r remote_name

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

heroku restart

重新启动该应用程序,您可以使用

alias hr='heroku restart'`

您可以将这些别名放在.bashrc文件中,或者(首选)放在从.bashrc调用的.bash_aliases文件中

Ruby-on-rails相关问答推荐

`heroku Open`和`heroku run rake db:Migrate`不工作(";没有这样的文件或目录";)

GO AES GCM加密在解密时出错&S

带有data-turbo的rails`link_to‘未获得turbo_stream请求格式

Rails 7,返回具有两个单独条件的活动记录关联,一个在父级,一个在子级

Restful Rails 编辑与更新

FactoryGirl 和 Rspec 测试中 attributes_for 的含义

Rails 4 Form: has_many through: checkboxes

运行多个 Rails Server 实例

Rails:使用 RSpec 测试命名范围

如何使用失败try 次数使设计可锁定

如何在 RoR 中实现成就系统

在两个 DateTime 之间迭代,步长为一小时

如何解决弃用警告方法 to_hash 已弃用并将在 Rails 5.1 中删除

Rails 5:无法从参数中检索哈希值

我如何找出为什么我不能#destroy() 记录?

如何在 Rails ActiveRecord 中指定日期小于今天的条件

默认呈现 JSON 而不是 HTML?

是否可以设置 travis 来运行多种语言的测试?

让 bundler 为不同的平台使用不同的 gem

我如何为 Rails3/Bundler 供应 gems