如果我尝试安装nokogiri,我收到以下错误:
rvmsudo gem install nokogiri
ERROR: Error installing nokogiri:
nokogiri requires Ruby version >= 1.9.2.
如果我检查我的ruby版本,它会告诉我我正在运行ruby1.9.3
ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
如果我使用printenv,这些是我的env变量:
rvm_bin_path=/home/jenkins/.rvm/bin
GEM_HOME=/home/jenkins/.rvm/gems/ruby-1.9.3-p448@nokogiri
SHELL=/bin/bash
TERM=xterm-color
IRBRC=/home/jenkins/.rvm/rubies/ruby-1.9.3-p448/.irbrc
HUSHLOGIN=FALSE
MY_RUBY_HOME=/home/jenkins/.rvm/rubies/ruby-1.9.3-p448
USER=jenkins
rvm_path=/home/jenkins/.rvm
L1=-
rvm_prefix=/home/jenkins
MAIL=/var/mail/jenkins
PATH=/home/jenkins/.rvm/gems/ruby-1.9.3-p448@nokogiri/bin:/home/jenkins/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/jenkins/.rvm/rubies/ruby-1.9.3-p448/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=/home/jenkins
LANG=C
rvm_version=1.21.3 (stable)
SHLVL=1
HOME=/home/jenkins
LOGNAME=jenkins
GEM_PATH=/home/jenkins/.rvm/gems/ruby-1.9.3-p448@nokogiri:/home/jenkins/.rvm/gems/ruby-1.9.3-p448@global
install_flag=1
RUBY_VERSION=ruby-1.9.3-p448
_=/usr/bin/printenv
我对RVM运气不错,而不是打破我的整个装置,我想我会问这里.
为什么我不能继续安装nokogiri?
我在Debian上.
最佳答案
只需尝试安装RVM就可以安装gem install nokogiri.有关其他安装的信息,请参见此处
Installing Nokogiri
.
如下所示:
# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri