How to get gpg command output in rails?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • littlemaster
    New Member
    • Apr 2010
    • 25

    How to get gpg command output in rails?

    scenario:
    ---------

    Need to upload the gpg encrypted file.
    Get that file and do decryption and store the output in a file
    Then extract that file and get the actual output

    Problem:
    -----------

    If I execute that command via command line, it was executed successfully. But via system command it was not running. The decrypted output will have control character. I think due to that it was not able to write that into a file.

    command I used:
    --------------
    system("gpg --output outfile.tgz --decrypt infile.tgzaa")

    After executed the above command, outfile.tgz is creating with zero byte size.

    Kindly advise me to achieve this .
Working...