Experimental Nokogiri version 1.6.0.rc1 (codename “Piano Key Necktie”)
has
been released!
PLEASE READ THE FOLLOWING BEFORE USING. THIS IS EXPERIMENTAL CODE.
Nokogiri 1.6.0.rc1 has a secret, but it’s a secret that should make
your life better. It contains the complete source code for libxml2 and
libxslt, and will compile it during gem installation.
That’s right, you’re witnessing the birth of a new thing, which I’m
christening a “Fat Source” gem. You’re welcome.
Pros:
- libxml2 and libxslt are no longer prerequisites for Nokogiri
- Nokogiri will always use a known-good version of libxml2
- installation should actually really seriously Just Work
Cons:
- the gem takes a bit longer to install, because it’s compiling libxml2
and
libxslt
If you want to use the system versions of these libraries
(essentially, the “old” gem installation process), you can set the
environment variable NOKOGIRI_USE_SYSTEM_LIBRARIES at gem installation
time.
If you want to know what libraries you’re using, try nokogiri -v
or
look at Nokogiri::VERSION_INFO.
In summary, this is good because some people don’t have libxml2
installed, and getting it installed and using the right version at
compile-time is a non-trivial problem. It’s also good because libxml
2.9.0 contains a bug around XPath query evaluation, and so Nokogiri
will use a known-good version.
I’d love to why you think this is a bad thing. Go.
P.S. I’m only releasing this for MRI for now, since JRuby and Windows
releases already contain binaries for the appropriate libraries.
Changes:
1.6.0.rc1 / 2013-04-14
-
Notes
- mini_portile is now a runtime dependency
- Ruby 1.9.2 and higher now required
-
Features
- (MRI) Source code for libxml 2.8.0 and libxslt 1.2.26 is packaged
with the gem. These libraries are compiled at gem install time
unless the environment variable NOKOGIRI_USE_SYSTEM_LIBRARIES is
set. VERSION_INFO (alsonokogiri -v
) exposes whether libxml was
compiled from packaged source, or the system library was used. - (Windows) libxml upgraded to 2.8.0
- (MRI) Source code for libxml 2.8.0 and libxslt 1.2.26 is packaged