How to export a Ruby Array from my Heroku console into CSV?

后端 未结 10 912
悲&欢浪女
悲&欢浪女 2021-02-02 11:17

I am looking to export an array from my heroku console into a local CSV file.

In my current situation, I have a daily rake task which looks for tweets talking about my a

10条回答
  •  清歌不尽
    2021-02-02 11:22

    You can't access your local filesystem from the heroku console. One option is to use Tee. Tee sends the output to both STDOUT and a file, so you can have a local log of everything that was printed.

    heroku run console | tee output.txt
    

提交回复
热议问题