ROR Upload Problems on Windows

I'm pretty new to ROR and working on a couple of small changes to an upload function, changing how the input spreadsheet is parsed.

The problem is that the upload does not work on my Windows based development platform. It does work on MAc and Unix variants though.

The logic is processing an uploaded spreadsheet file which is then processed/parsed by the 'spreadsheet' gem. But on Windows the spreadsheet.open call fails with an error of "broken allocationtable chain". It appears that the file is corrupted as part of the upload when it is written to the temp file.

There are comments on various Ruby pages about having to change the file open to binary, but I'm assuming this is the open buried in te Rails upload function.

Has anyone come across this before? Any suggestions or ideas for a novice?

Many thanks

Try using the File.open("myfile", "a"), also the rdocs for the io class describes the different types

First suggestion: this is a question for rails-talk, not rails-core. I'm sending this to the correct list...

Secondly, I'd look at the version of ruby-ole on the Windows machine vs. the production machines, as that's the function that appears to be giving the error. I'd also recommend manually opening the uploaded file in Excel to see if it's actually corrupt.

--Matt Jones