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
FWIW you could pretty easily puts a string with commas and newlines and then copy paste into your text editor and save as .csv, though "all of the tweets" might be a little unwieldy.
tweets = Tweet.all
@string = String.new()
@string << Tweet.last.attributes.keys.join(", ") + "\n" # "header" row with attribute names
tweets.each do |t|
@string << t.attributes.values.join(", ") + "\n"
end
puts @string #will output string with \n newline which you could then copy paste into your editor and save as a csv