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

后端 未结 10 1024
悲&欢浪女
悲&欢浪女 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:30

    You can shell out to SCP:

    my_data = "hello world"
    File.write("tmp/data", my_data)
    `scp tmp/data me@some-server:`
    

    It may prompt you about the server being unknown and ask for a password.

提交回复
热议问题