How can I pass the csv file or file stream or something in line of that to the rake task I'm running on the remote app via rake task arguments?
So I can get the contents of that file in the file and do something with it. It's not a big file.
Update
I tried with suggestion from Luc:
desc 'Test task'
namespace :app do
task :pipe_file => [:environment] do |t, args|
puts "START"
File.open('my_temp_file', 'w') do |f2|
while line = STDIN.gets
f2.puts line
end
end
puts "DONE"
end
end
So when I run :
cat tst.csv | bundle exec rake app:pipe_file
Nothing happens, blank line prints