Unable to install nokogiri using rvm, receiving "nokogiri requires Ruby version >= 1.9.2"

12,829

Just try gem install nokogiri as you have RVM installed. See here Installing Nokogiri for other things to install with it.

Like below :

# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri

See my answer here for the part ERROR: While executing gem ... (Errno::EACCES) ` Permission denied

Share:
12,829
harperville
Author by

harperville

Thirsty for knowledge. I have a fair amount of background in all things ISP and software development. I have worn many hats, including, but not limited to, Windows System Administrator, Linux System Administrator, Access Field Technician, Facilities Manager, Web Developer, Database Administrator, and just the go-to guy for IT problem solving. I'll find a way.

Updated on June 04, 2022

Comments

  • harperville
    harperville about 2 years

    If I try to install nokogiri, I receive the following error:

    rvmsudo gem install nokogiri
    ERROR:  Error installing nokogiri:
        nokogiri requires Ruby version >= 1.9.2.
    

    If I check my ruby version, it tells me I am running ruby1.9.3

    ruby -v
    ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
    

    If I use printenv, these are my env variables:

    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
    

    I have some pretty bad luck with RVM and rather than break my entire installation, I thought I'd ask here.

    Why can't I proceed with the installation of nokogiri?

    I'm on Debian.