how to run a simple file on heroku

后端 未结 5 1923
庸人自扰
庸人自扰 2021-02-05 13:46

say I\'ve got my rails app on github and am deploying the github repo on heroku.

I\'ve got a situation where I have a simple text file with bunch of words (it is in my g

5条回答
  •  时光说笑
    2021-02-05 13:49

    Put your ruby script in a bin directory and git push it to Heroku. Now you can execute a shell command in the heroku console.

    For example, if your Ruby script is bin/foo.rb, you can run the following command in the Heroku console:

    `ruby bin/foo.rb`
    

    Note the use of backticks.

提交回复
热议问题