Brian Candler wrote:
> Peter Bailey wrote:
>> I'm querying a graphics database using http.
> 
> ... and ruby 1.9.1, it appears
> 
>> On my server and on my PC,
>> I can successfully run a simple script that checks for the existence of
>> files in different formats???PDF, PNG, and TIFF. But, when my colleagues
>> run this same script, they get the error I display below.
> 
> ruby 1.9's runtime behaviour of anything using String varies depending 
> on the environment it runs in. It is quite difficult to get it behave 
> sanely, and is such a mess that I stick with ruby 1.8. I think this is 
> particularly likely to be your problem given that you are handling 
> binary data.
> 
> You could try looking at the body of the 400 response to see if it has 
> any more detail about what's gone wrong (that is, check Response#body 
> before Response#value), or you could use wireshark to look at the actual 
> packets going back and forth. Compare what you see on the working 
> machine with the non-working one.
> 
> If you are reading any data from local files on disk before posting, you 
> could try File.open(name,"rb"). You could also try adding "# encoding: 
> UTF-8" to the top of your source file, and also running your script 
> using ruby -Kn script.rb
> 
> If those don't work, then I'd suggest you stick with ruby 1.8 for the 
> next year or so.

Thanks, Brian. Well, ironically, I've got 1.9 on my PC, and it works, 
and, I'm running 1.8.6 on my server, and it works there, too. My 
assistant's PC now, too, using 1.9. I increased her permissions on the 
c:\ruby folder on her PC. That seemed to do it. But, our other two 
colleagues still can't get it to work. We keep getting the error above. 
We've got them on 1.9 now. I'm going to try some of your suggestions.
-- 
Posted via http://www.ruby-forum.com/.