New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Tempfile binary mode on windows #109
Conversation
Apparently the ':encoding => 'binary'' option does not change file to binmode, at least not on windows. This changeset changes file to binary mode by calling binmode on the IO object.
Change tempfile in atomic_write to binary mode
I'm experiencing the issue that this pull request would fix. Any chance it could be merged in soon? |
I'm also getting hit by this issue. What needs to be done to wrap this up? |
I'm presuming that this has not been pulled in due to a failed unit test on Travis. I have tried running the unit tests against ruby 1.9.3p327 on a ubuntu machine, but they all passed. Was this test failure due to an outlying issue on Travis or is something wrong with my setup. I just ran rake to run the tests, which appeared to be the same that Travis ran. |
Next chance I get, I'm going to kill off the 1.8.7 tests on Travis -- we should no longer support this. |
The test failure is not caused by this change, it was broken prior to this. I am also pretty sure the change will work on ruby 1.8 |
I have patched my local machine with this change and after I upload a custom gem of mine I am seeing this error: Errno::ENOENT:No such file or directory - var/geminabox-data/specs.4.8 any thoughts? |
I can see that the file exists, so I don't understand why I would get this error. |
No - Not sure, maybe something with the Geminabox.data setting. It's been a while since I messed with this and I can't remember how I configured it. Maybe try with an absolute path |
absolute path did not work |
ok, so I get that error on the first gem that I upload then it goes away after that. The problem I'm seeing now is that home page is throwing on:
|
@mtscout6 can you try on my forked patch-1 branch, maybe this is a new issue. I am on an Ubuntu machine at the moment, so I cannot try it out right now |
I've tried from both your patch-1 branch as well as by merging in the lastest master branch from the upstream repo. |
See pull request #129 I finally got things working. |
Ok - Got a windows machine booted and gem installed geminabox version 0.11.0 and applied my patch. Got this error at first C:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:16:in Then required 'rubygems/user_interaction' and it worked. I do get the error with the spec file, but the upload works. I uploaded via the web interface though. Heres my config.ru:
I used webrick as server |
@bebac You are correct that the file upload was working. The problem that I was seeing was that the home page would no longer work. I finally figured out that the File.read operation that was reading the spec file was not respecting binary read. I fixed it is pull request #129. Thanks for helping me out. |
@mtscout6 Sorry - missed you last comment. You got it working - Cool! |
I vote we close this pull request now in favor of #129 which includes the changes within this pull request. |
I agree |
This makes geminabox work on windows.
I have not tested this on other platforms than windows. Also not tested on other ruby versions than 1.9.3p392, but I expect binmode is supported on all ruby platforms.