Skip to content
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

Problems with ruby IO methods #10

Closed
seoanezonjic opened this issue Apr 8, 2019 · 2 comments
Closed

Problems with ruby IO methods #10

seoanezonjic opened this issue Apr 8, 2019 · 2 comments

Comments

@seoanezonjic
Copy link

Hi
I'm using the nmatrix gem and this gem uses as dependency packable. When I perform a require of nmatrix and use the method each of IO, in order to read a plain text file, as for example:

File.open(file_name, 'w').each do |line|

I get the following error:

.gem/ruby/2.4.1/gems/packable-1.3.10/lib/packable/extensions/io.rb:56:in `each': not opened for reading (IOError)
        from .gem/ruby/2.4.1/gems/packable-1.3.10/lib/packable/extensions/io.rb:56:in `each_with_packing'

This problem was commented in this issue: SciRuby/nmatrix#548 but I'm not sure about if this is an implementation problem of nmatrix or of packable ¿Can you give me some workaround for this problem or some advice? I'm really stuck with this problem.
Thank you in advance
Pedro Seoane

@seoanezonjic
Copy link
Author

Sorry for the error, but this problem is manifestated by the use of 'w' when the open method is invoked. With the correct use of open, the problem is gone but this issue is still open in nmatrix git and I'd misunderstood the problem. I see that you belong to the SciRuby community ¿Can you speak with the nmatrix people about this? I think that your two last commits fixed the problem but their fork lacks of them.
Thank you and sorry for the inconvenience.
Pedro Seoane

@marcandre
Copy link
Owner

I believe this is is fixed in 1.3.12. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants