title: Running rake task on remote app, use file from local machine
body: <p>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?</p>
  
  <p>So I can get the contents of that file in the file and do something with it. It's not a big file.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I tried with suggestion from Luc:</p>
  
  <pre><code>desc 'Test task'
  namespace :app do
    task :pipe_file =&gt; [: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
  </code></pre>
  
  <p>So when I run :</p>
  
  <pre><code>cat tst.csv | bundle exec rake app:pipe_file
  </code></pre>
  
  <p>Nothing happens, blank line prints</p>