I have a rails app deployed to heroku. I have used paperclipftp to upload files to an ftp server, as heroku doesn't give much features with file uploading. So when I try to upload a file and save a record, I get this error.
Net::FTPPermError (500 I won't open a connection to 10.10...... (only to 174.12........)
I don't know why this is coming up. After some searching I came to know that Heroku doesn't allow active FTP connections so tried to establish a passive connection by editing the paperclipftp file.
I added this line in its initialize block
@ftp.passive = @ftp_credentials[:passive] if @ftp_credentials.has_key?("passive")
and passed a variable [passive:true]
in my YAML config file. But still it doesn't work.
Please Help. Thanks in advance.