Updated to ruby ​​1.9.2 and gets segmentation errors in nokogiri

I decided to upgrade to 1.9.2 rubies yesterday, and also installed rvm for this. I ran the last few files that previously worked on 1.8.7, but everything that required nokogiri fails with the following errors.

/Users/myusername/.rvm/gems/ruby-1.9.2-p0/gems/nokogiri-1.4.3.1/lib/nokogiri/nokogiri.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

I am running nokogiri 1.4.3.1, ruby ​​1.9.2 on OSX Snow Leopard 10.6.4

+4
source share
5 answers

nokogiri, , RVM, - 1.9.2 ( - 1.9.2p136), ruby 1.8.7 nokogiri, , , ...

$ rails c
/Users/lex/.rvm/gems/ruby-1.9.2-p136@lmi/gems/nokogiri-1.4.4/lib/nokogiri/nokogiri.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Abort trap

(1) , ruby ​​1.8.7 rvm: - rvm list

, : ex: rvm uninstall ree-1.8.7-2010.02

(2) nokogiri libxml2:

$ gem uninstall nokogiri
$ brew uninstall libxml2

(3) libxml2 homebrew

$ brew install libxml2
$ brew link libxml2

(4) libxslt

$ wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
$ tar -zxvf libxslt-1.1.26.tar.gz
$ cd libxslt-1.1.26
$ ./configure --prefix=/usr/local/Cellar/libxslt/1.1.26    --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
$ make
$ sudo make install

(5) nokogiri

gem install nokogiri

(, ): gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.7/include --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.7/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26

(6) test

$ rails c
Loading development environment (Rails 3.0.3)
>>

Ruby XML, , . : LibXML, Hpricot, REXML

+5

, rvm, .

rvm 1.9.2

, 1.8.7?

, ruby ​​ . ABI, afaik.

+4

, Nokogiri Leopard, Snow Leopard?

, a gem uninstall nokogiri, gem install nokogiri. Ruby OS.

, Leopard Snow Leopard Ruby. , .

+2

rvm requirements , - . ( X)

brew .

0

, mmrobins :

rvm gemset empty

, .

0

All Articles