-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
Bad file descriptor with Nokogiri 1.5.0 #495
Comments
This showstopper also occurs on Ubuntu. This means that even the simple example from the Nokogiri tutorial fails with the Bad descriptor error: require 'rubygems'
require 'nokogiri'
f = File.open("blossom.xml")
doc = Nokogiri::XML(f)
f.close |
Getting the same issue. My codebase works fine with MRI nokogiri on my OS X machine. Using jruby one on windows. |
@yokolet - this seems like it should be easy to solve. Would you mind taking a look if you have a moment? |
Sorry, I wasn't aware of this issue. I'll have a look. |
At the time of raising that issue, I had tracked it down to using a relative path in |
Thanks for additional info. I fixed this issue in rev. ef406cc .If you have a chance, try master. Thanks for reporting the bug. And sorry for my really late response. |
Hi Yoko, I have been able to run my original script using master, so I reckon your fix did the trick indeed. Thanks for that. And still looking forward to your talk! ;-) |
Good to know. And, yes, I look forward to JRubyConf :) |
I'm getting this same error on Nokogiri 1.5.5 using JRuby 1.7.0 under Ubuntu 12.04. The error seems to occur when closing a file that has been parsed by Nokogiri. I can use the Nokogiri document if I don't close the file. Code: f = File.open("test.xml")
Nokogiri.XML(f)
f.close # Error is caused by this line test.xml: <test/> Versions: > java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)
> jruby -v
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Server VM 1.7.0_05-b06 [linux-i386]
> jruby -S gem list nokogiri
*** LOCAL GEMS ***
nokogiri (1.5.5 java)
|
I'm able to reproduce this bug with nokogiri 1.5.5 in jruby on OSX
|
Thanks for reporting this bug. I just confirmed that the issue is on master with JRuby 1.6.7 and JRuby 1.7.0. I'll take a look and get back to you shortly. |
I am getting a Bad file descriptor error when using Nokogiri 1.5.0 with JRuby 1.6.2 and 1.6.3 on Win7. I have managed to reproduce the issue with a very simple script which works with MRI:
The XML file being parsed doesn't seem to matter.
Here is the stacktrace:
Apologies if this has been already raised.
The text was updated successfully, but these errors were encountered: