# Re: RUBY on 64-bit Windows PCs

**URL:** <https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642>\
**Category:** Ruby\
**Created:** [May 9, 2006, 9:23pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642 "2006-05-09T21:23:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 9, 2006, 9:23pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642/1 "2006-05-09T21:23:41Z")

</div>

> > > From: removed\_email\_address@domain.invalid  
> > > connection for every file. My _guess_ is that one of those  
> > > ftp.chdir(‘/data/ps2000test’)  
> > > Dan
> 
> Yes, I know that I’m iterating ftps here. But, it works on multiple  
> 32-bit machiens. That’s why I’m questioning it. Anyway, is  
> there such a  
> thing as “mput” instead of just “put” in RUBY ftp? Without a  
> block, how  
> could I send multiple files in ftp?

Good question. I don’t see anything in ftp.rb, but I could be missing  
something. I’d be in favor of FTP#mput and FTP#mget methods myself.

Indulge me - try using a non-block form of Net::FTP and see if it makes  
any difference:

cindexfiles = Dir.glob(“_\__-\*.pdf”)  
cindexfiles.each do |cindexfile|  
ftp = Net::FTP.open(‘[mpc.bna.com](http://mpc.bna.com)’)  
ftp.debug\_mode = true  
ftp.passive = true  
ftp.login(‘peterb’,‘pbail’)  
ftp.chdir(‘/data/ps2000test’)  
ftp.putbinaryfile(cindexfile)  
end

Regards,

Dan

This communication is the property of Qwest and may contain confidential  
or  
privileged information. Unauthorized use of this communication is  
strictly  
prohibited and may be unlawful. If you have received this communication  
in error, please immediately notify the sender by reply e-mail and  
destroy  
all copies of the communication and any attachments.

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 9, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642/2 "2006-05-09T21:31:37Z")

</div>

Berger, Daniel wrote:

> > > > From: removed\_email\_address@domain.invalid  
> > > > connection for every file. My _guess_ is that one of those  
> > > > ftp.chdir(‘/data/ps2000test’)  
> > > > Dan
> > 
> > Yes, I know that I’m iterating ftps here. But, it works on multiple  
> > 32-bit machiens. That’s why I’m questioning it. Anyway, is  
> > there such a  
> > thing as “mput” instead of just “put” in RUBY ftp? Without a  
> > block, how  
> > could I send multiple files in ftp?
> 
> Good question. I don’t see anything in ftp.rb, but I could be missing  
> something. I’d be in favor of FTP#mput and FTP#mget methods myself.
> 
> Indulge me - try using a non-block form of Net::FTP and see if it makes  
> any difference:
> 
> cindexfiles = Dir.glob(“_\__-\*.pdf”)  
> cindexfiles.each do |cindexfile|  
> ftp = Net::FTP.open(‘[mpc.bna.com](http://mpc.bna.com)’)  
> ftp.debug\_mode = true  
> ftp.passive = true  
> ftp.login(‘peterb’,‘pbail’)  
> ftp.chdir(‘/data/ps2000test’)  
> ftp.putbinaryfile(cindexfile)  
> end
> 
> Regards,
> 
> Dan
> 
> This communication is the property of Qwest and may contain confidential  
> or  
> privileged information. Unauthorized use of this communication is  
> strictly  
> prohibited and may be unlawful. If you have received this communication  
> in error, please immediately notify the sender by reply e-mail and  
> destroy  
> all copies of the communication and any attachments.

Thanks for your ftp query. And, thanks for your persistence here. But,  
sorry, I’m feeling kind of ignorant here. If I have a bunch of PDF files  
in a directory, how can I do things to each of them, like ftp, WITHOUT a  
block of some sort? Or, without some kind of multi-file ftp put, like  
mput??

Cheers,  
Peter

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 9, 2006, 11:06pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642/3 "2006-05-09T23:06:30Z")

</div>

Berger, Daniel wrote:

> > > > -----Original Message-----
> > > 
> > > end  
> > > Yes, I know that I’m iterating ftps here. But, it works on multiple  
> > > Indulge me - try using a non-block form of Net::FTP and see if it makes  
> > > end

Shouldn’t that be something like:

cindexfiles = Dir.glob(“_\__-\*.pdf”)

ftp = Net::FTP.open(‘[mpc.bna.com](http://mpc.bna.com)’)  
ftp.debug\_mode = true  
ftp.passive = true  
ftp.login(‘peterb’,‘pbail’)  
ftp.chdir(‘/data/ps2000test’)

cindexfiles.each do |cindexfile|  
ftp.putbinaryfile(cindexfile)  
end

ftp.close

?

-Justin

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 10, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642/4 "2006-05-10T14:15:15Z")

</div>

Justin C. wrote:

> Berger, Daniel wrote:
> 
> > > > > -----Original Message-----
> > > > 
> > > > end  
> > > > Yes, I know that I’m iterating ftps here. But, it works on multiple  
> > > > Indulge me - try using a non-block form of Net::FTP and see if it makes  
> > > > end
> 
> Shouldn’t that be something like:
> 
> cindexfiles = Dir.glob(“_\__-\*.pdf”)
> 
> ftp = Net::FTP.open(‘[mpc.bna.com](http://mpc.bna.com)’)  
> ftp.debug\_mode = true  
> ftp.passive = true  
> ftp.login(‘peterb’,‘pbail’)  
> ftp.chdir(‘/data/ps2000test’)
> 
> cindexfiles.each do |cindexfile|  
> ftp.putbinaryfile(cindexfile)  
> end
> 
> ftp.close
> 
> ?
> 
> -Justin

Yes, that’s definitely smarter. I thought about it last night, and, of  
course, it’s smarter to iterate just the files rather than the whole ftp  
transaction. But, anyway, I tried this again this morning with IRB, just  
sending one file, not many, and it freezes as soon as I type in the  
“end.”
