I want write image(thumbnail is binary data) to ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch directory. But i got error like following: #### SocketError (getaddrinfo: Name or service not known) #### My writing codes like this: #### ftp_host="ftp://showreelfinder.com" ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") ftp.login ftp.putbinaryfile(thumbnail,"www.showreelfinder.com/web/site/temp/ uploads /heywatch"+encoded_video.title)#thumbnail is binary data ftp.close ### puttextfile(localfile, remotefile = File.basename(localfile)) {| line| ...},the localfile params can not be binary data? or remotefile must exist on ftp server? Thanks!
Tom Z Meinlschmidt
2009-May-12 13:07 UTC
Re: SocketError (getaddrinfo: Name or service not known)
remove ftp:// from you ftp_host variable daociyiyou wrote:> I want write image(thumbnail is binary data) to > ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch > directory. But i got error like following: > #### > SocketError (getaddrinfo: Name or service not known) > #### > My writing codes like this: > #### > ftp_host="ftp://showreelfinder.com" > ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") > ftp.login > ftp.putbinaryfile(thumbnail,"www.showreelfinder.com/web/site/temp/ > uploads > /heywatch"+encoded_video.title)#thumbnail is binary data > ftp.close > ### > puttextfile(localfile, remotefile = File.basename(localfile)) {| > line| ...},the localfile params can not be binary data? or > remotefile must exist on ftp server? > > > Thanks! >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ===============================================================================
Thanks. But i got another error: #### Net::FTPPermError (500 Unknown command. ): #### So i changed the codes according to my guess: #### ftp_host="showreelfinder.com" ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") ftp.login ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) ftp.close #### I still get the error: #### Net::FTPPermError (500 Unknown command. ): #### I want write the binary data(thumbnail) to the ftp address ("ftp:// showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ heywatch/"+encoded_video.title),the encoded_video.title file does not exist on ftp server. so how do i manage?
Tom Z Meinlschmidt
2009-May-12 16:25 UTC
Re: SocketError (getaddrinfo: Name or service not known)
ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) change to ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) tom daociyiyou wrote:> Thanks. But i got another error: > > #### > Net::FTPPermError (500 Unknown command. ): > #### > > So i changed the codes according to my guess: > > #### > ftp_host="showreelfinder.com" > ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") > ftp.login > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > ftp.close > #### > > I still get the error: > > #### > Net::FTPPermError (500 Unknown command. ): > #### > I want write the binary data(thumbnail) to the ftp address ("ftp:// > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > heywatch/"+encoded_video.title),the encoded_video.title file does not > exist on ftp server. > so how do i manage? >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ===============================================================================
Tom Z Meinlschmidt
2009-May-12 16:29 UTC
Re: SocketError (getaddrinfo: Name or service not known)
back, your code is wrong ftp = Net::FTP.new(ftp_host) ftp.login(''username'',''password'') ftp.chdir(''/www.showreelfinder.com/web/site/temp/uploads/heywatch/'') ftp.putbinaryfile(thumbnail, encoded_video.title) ftp.close tom daociyiyou wrote:> Thanks. But i got another error: > > #### > Net::FTPPermError (500 Unknown command. ): > #### > > So i changed the codes according to my guess: > > #### > ftp_host="showreelfinder.com" > ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") > ftp.login > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > ftp.close > #### > > I still get the error: > > #### > Net::FTPPermError (500 Unknown command. ): > #### > I want write the binary data(thumbnail) to the ftp address ("ftp:// > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > heywatch/"+encoded_video.title),the encoded_video.title file does not > exist on ftp server. > so how do i manage? >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ===============================================================================
I have changed to ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/ web/site/temp/uploads/heywatch/"+encoded_video.title) and still got that error. Then i changed to ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/web/site/temp/ uploads/heywatch/"+encoded_video.title+".jpg") The same error happend. On 5月13日, 上午12时25分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote:> ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > change to > > ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > tom > > > > daociyiyou wrote: > > Thanks. But i got another error: > > > #### > > Net::FTPPermError (500 Unknown command. ): > > #### > > > So i changed the codes according to my guess: > > > #### > > ftp_host="showreelfinder.com" > > ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") > > ftp.login > > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > >www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > ftp.close > > #### > > > I still get the error: > > > #### > > Net::FTPPermError (500 Unknown command. ): > > #### > > I want write the binary data(thumbnail) to the ftp address ("ftp:// > > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > > heywatch/"+encoded_video.title),the encoded_video.title file does not > > exist on ftp server. > > so how do i manage? > > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > ===============================================================================
Thanks. I have changed the wrong codes but got the third error: ###### Net::FTPPermError (550 Failed to change directory. ) ##### My ftp complete directory is ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/ On 5月13日, 上午12时29分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote:> back, your code is wrong > > ftp = Net::FTP.new(ftp_host) > ftp.login(''username'',''password'') > ftp.chdir(''/www.showreelfinder.com/web/site/temp/uploads/heywatch/'') > ftp.putbinaryfile(thumbnail, encoded_video.title) > ftp.close > > tom > > > > daociyiyou wrote: > > Thanks. But i got another error: > > > #### > > Net::FTPPermError (500 Unknown command. ): > > #### > > > So i changed the codes according to my guess: > > > #### > > ftp_host="showreelfinder.com" > > ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") > > ftp.login > > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > >www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > ftp.close > > #### > > > I still get the error: > > > #### > > Net::FTPPermError (500 Unknown command. ): > > #### > > I want write the binary data(thumbnail) to the ftp address ("ftp:// > > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > > heywatch/"+encoded_video.title),the encoded_video.title file does not > > exist on ftp server. > > so how do i manage? > > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > ===============================================================================
Tom Z Meinlschmidt
2009-May-12 17:21 UTC
Re: SocketError (getaddrinfo: Name or service not known)
so you have to check the directory manually I suppose change chdir to web/site/temp/uploads/heywatch ... tom daociyiyou wrote:> Thanks. > I have changed the wrong codes but got the third error: > ###### > Net::FTPPermError (550 Failed to change directory. ) > ##### > My ftp complete directory is > ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/ > > On 5月13日, 上午12时29分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote: >> back, your code is wrong >> >> ftp = Net::FTP.new(ftp_host) >> ftp.login(''username'',''password'') >> ftp.chdir(''/www.showreelfinder.com/web/site/temp/uploads/heywatch/'') >> ftp.putbinaryfile(thumbnail, encoded_video.title) >> ftp.close >> >> tom >> >> >> >> daociyiyou wrote: >>> Thanks. But i got another error: >>> #### >>> Net::FTPPermError (500 Unknown command. ): >>> #### >>> So i changed the codes according to my guess: >>> #### >>> ftp_host="showreelfinder.com" >>> ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") >>> ftp.login >>> ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ >>> www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) >>> ftp.close >>> #### >>> I still get the error: >>> #### >>> Net::FTPPermError (500 Unknown command. ): >>> #### >>> I want write the binary data(thumbnail) to the ftp address ("ftp:// >>> showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ >>> heywatch/"+encoded_video.title),the encoded_video.title file does not >>> exist on ftp server. >>> so how do i manage? >> -- >> ==============================================================================>> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache >> - experienced RoR/PHP freelancer, available for hire >> >> www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz >> ==============================================================================>-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ===============================================================================
hi Tom My ftp directory setting is right.ftp api need port to be specified? I got another error ### Net::FTPPermError (500 Illegal PORT command. ): ### My codes is ### Net::FTP.open(''showreelfinder.com'') do |ftp| ftp.login(''heywatch'',''JRnu4bNtXk'') ftp.chdir(''thumbnail'') ftp.putbinaryfile(''public/images/rails.png'',encoded_video.title) ### I have tried my best.My server forbids ftp access or my computer occupied the 21 port? Ftp really make me like a idiot. ===============================================================================
can you help me?
Tom Z Meinlschmidt
2009-May-13 16:13 UTC
Re: SocketError (getaddrinfo: Name or service not known)
try to set passive mode daociyiyou wrote:> hi Tom > My ftp directory setting is right.ftp api need port to be specified? I > got another error > > ### > Net::FTPPermError (500 Illegal PORT command. ): > ### > > My codes is > > ### > Net::FTP.open(''showreelfinder.com'') do |ftp| > ftp.login(''heywatch'',''JRnu4bNtXk'') > ftp.chdir(''thumbnail'') > ftp.putbinaryfile(''public/images/rails.png'',encoded_video.title) > ### > > I have tried my best.My server forbids ftp access or my computer > occupied the 21 port? > Ftp really make me like a idiot. > > > ==============================================================================>-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ===============================================================================
Thank you very much! After changed to passive mode,it works for normal image file.But for thumbnail(binary data),i does not.The ftp api does not support binary data writing? I got the error:No such file or directory On 5月14日, 上午12时13分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote:> try to set passive mode > > > > daociyiyou wrote: > > hi Tom > > My ftp directory setting is right.ftp api need port to be specified? I > > got another error > > > ### > > Net::FTPPermError (500 Illegal PORT command. ): > > ### > > > My codes is > > > ### > > Net::FTP.open('showreelfinder.com') do |ftp| > > ftp.login('heywatch','JRnu4bNtXk') > > ftp.chdir('thumbnail') > > ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > > ### > > > I have tried my best.My server forbids ftp access or my computer > > occupied the 21 port? > > Ftp really make me like a idiot. > > > ==============================================================================> > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > ==============================================================================--~--~---------~--~----~------------~-------~--~----~You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Z Meinlschmidt
2009-May-13 18:31 UTC
Re: SocketError (getaddrinfo: Name or service not known)
"I got the error:No such file or directory" it's not problem with binary mode, but with your file :) tom daociyiyou wrote:> Thank you very much! After changed to passive mode,it works for normal > image file.But for thumbnail(binary data),i does not.The ftp api does > not support binary data writing? I got the error:No such file or > directory > > On 5月14日, 上午12时13分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote: >> try to set passive mode >> >> >> >> daociyiyou wrote: >>> hi Tom >>> My ftp directory setting is right.ftp api need port to be specified? I >>> got another error >>> ### >>> Net::FTPPermError (500 Illegal PORT command. ): >>> ### >>> My codes is >>> ### >>> Net::FTP.open('showreelfinder.com') do |ftp| >>> ftp.login('heywatch','JRnu4bNtXk') >>> ftp.chdir('thumbnail') >>> ftp.putbinaryfile('public/images/rails.png',encoded_video.title) >>> ### >>> I have tried my best.My server forbids ftp access or my computer >>> occupied the 21 port? >>> Ftp really make me like a idiot. >>> ==============================================================================>> -- >> ==============================================================================>> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache >> - experienced RoR/PHP freelancer, available for hire >> >> www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz >> ==============================================================================> >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz ============================================================================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ftp api itself has binary mode ,but not support the file writing which itself is initially binary data? not support binary data writing? I got the error:No such file or directory On 5月14日, 上午2时31分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote:> "I got the error:No such file or directory" > > it's not problem with binary mode, but with your file :) > > tom > > > > daociyiyou wrote: > > Thank you very much! After changed to passive mode,it works for normal > > image file.But for thumbnail(binary data),i does not.The ftp api does > > not support binary data writing? I got the error:No such file or > > directory > > > On 5月14日, 上午12时13分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote: > >> try to set passive mode > > >> daociyiyou wrote: > >>> hi Tom > >>> My ftp directory setting is right.ftp api need port to be specified? I > >>> got another error > >>> ### > >>> Net::FTPPermError (500 Illegal PORT command. ): > >>> ### > >>> My codes is > >>> ### > >>> Net::FTP.open('showreelfinder.com') do |ftp| > >>> ftp.login('heywatch','JRnu4bNtXk') > >>> ftp.chdir('thumbnail') > >>> ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > >>> ### > >>> I have tried my best.My server forbids ftp access or my computer > >>> occupied the 21 port? > >>> Ftp really make me like a idiot. > >>> ==============================================================================> >> -- > >> ==============================================================================> >> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > >> - experienced RoR/PHP freelancer, available for hire > > >> www.meinlschmidt.comwww.maxwellrender.czwww.lightgems.cz > >> ==============================================================================> > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > ==============================================================================--~--~---------~--~----~------------~-------~--~----~You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ftp api itself has binary mode ,but not support the file writingwhich itself is initially binary data?
hi tom I have resolved the problem by writing the binary data in the local file and transfer it to the ftp. On 5月14日, 上午2时31分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote:> "I got the error:No such file or directory" > > it's not problem with binary mode, but with your file :) > > tom > > > > daociyiyou wrote: > > Thank you very much! After changed to passive mode,it works for normal > > image file.But for thumbnail(binary data),i does not.The ftp api does > > not support binary data writing? I got the error:No such file or > > directory > > > On 5月14日, 上午12时13分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote: > >> try to set passive mode > > >> daociyiyou wrote: > >>> hi Tom > >>> My ftp directory setting is right.ftp api need port to be specified? I > >>> got another error > >>> ### > >>> Net::FTPPermError (500 Illegal PORT command. ): > >>> ### > >>> My codes is > >>> ### > >>> Net::FTP.open('showreelfinder.com') do |ftp| > >>> ftp.login('heywatch','JRnu4bNtXk') > >>> ftp.chdir('thumbnail') > >>> ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > >>> ### > >>> I have tried my best.My server forbids ftp access or my computer > >>> occupied the 21 port? > >>> Ftp really make me like a idiot. > >>> ==============================================================================> >> -- > >> ==============================================================================> >> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > >> - experienced RoR/PHP freelancer, available for hire > > >> www.meinlschmidt.comwww.maxwellrender.czwww.lightgems.cz > >> ==============================================================================> > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > ==============================================================================--~--~---------~--~----~------------~-------~--~----~You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---