HHH v4

How to load file to heroku

Edit
equivalent Web Development
Public
Heroku
linux
VM
Let say I have long list of emails:

[email protected]
[email protected]
....

 I need to check in prod db via rails console.
 
If I just paste the array to console it will take ages.

It's easier to just SSH to vm/heroku dyno in bash and paste it to file

Heroku:

heroku run bash -a nameofmyherokuappp -s performance-m

Heroku dyno has `nano` so::

cd /tmp
nano foo.text

Paste the values and close with `^X` (and save)

now  in enter rails console

cd
rails c

and load

emails = File.read("/tmp/foo.txt").split("\n").map(&:strip); nil