我們在Rails項目中有一個構建管道:我們在測試服務器中捆綁並測試應用程序,然後我們將它複製到登臺服務器並將其部署到一個臨時服務器上(代碼爲gem,代碼爲vendor/
)乘客服務器。nokogiri:生產環境中的重定位錯誤
它用於工作,但現在我得到的apache.error.log
以下錯誤:
WARNING: Nokogiri was built against LibXML version 2.7.6, but has dynamically loaded 2.6.26
/usr/local/rvm/rubies/ruby-1.9.2-p318/bin/ruby:
relocation error: /home/project/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.5.2/lib/nokogiri/nokogiri.so:
symbol xmlNextElementSibling, version LIBXML2_2.7.3 not defined in file libxml2.so.2 with link time reference
在瀏覽器
和error 500
。
當我在登臺服務器上運行webbrick時,第一次請求時出現類似的錯誤。我怎麼解決它?
編輯: 與nokogiri版本的stange事情。
vendor/bundle/ruby/1.9.1/gems/nokogiri-1.5.2/bin/nokogiri -v
# Nokogiri (1.5.2)
---
warnings: []
nokogiri: 1.5.2
ruby:
version: 1.9.2
platform: x86_64-linux
description: ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux]
engine: ruby
libxml:
binding: extension
compiled: 2.6.26
loaded: 2.6.26
$ bundle exec vendor/bundle/ruby/1.9.1/gems/nokogiri-1.5.2/bin/nokogiri -v
WARNING: Nokogiri was built against LibXML version 2.7.6, but has dynamically loaded 2.6.26
# Nokogiri (1.5.2)
---
warnings:
- Nokogiri was built against LibXML version 2.7.6, but has dynamically loaded 2.6.26
nokogiri: 1.5.2
ruby:
version: 1.9.2
platform: x86_64-linux
description: ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux]
engine: ruby
libxml:
binding: extension
compiled: 2.7.6
loaded: 2.6.26
謝謝,我檢查的libxml版本,參見編輯。 – mrzasa