Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load local file during heroku rake task

Tags:

rake

heroku

I have an import utility I'd like to use for creating records on heroku.

I want to use that to import data from a file on my development machine without having to check the file into the repository. Is there a way to do this with a rake task or the heroku gem?

I could upload the file in a web form which could time out, or I could store the file on S3, but that seems rather excessive.

Any easy way to do this?

like image 715
Alex Neth Avatar asked Feb 08 '12 23:02

Alex Neth


1 Answers

You can read from standard in on your machine.

heroku run rake whatever <./file
like image 123
vish Avatar answered Sep 21 '22 13:09

vish