简体   繁体   English

如何在Ruby文件中运行heroku命令?

[英]How to run heroku commands in Ruby file?

I want to run heroku commands (such as 'heroku scale worker=5') in a ruby on rails class. 我想在Rails类的ruby中运行heroku命令(例如“ heroku scale worker = 5”)。 Example: 例:

class Foo
  def self.perform
    Heroku.run('heroku scale worker=10')
  end
end

Is there a gem or plugin to handle this? 是否有宝石或插件来处理?

Yes there's the heroku-api gem: 是的,有heroku-api gem:

https://github.com/heroku/heroku.rb https://github.com/heroku/heroku.rb

HTH? HTH?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM