0

I'm trying to run following command in Terminal :

gem install bundler && bundle install --without test development

But get me error about Ruby version, you can see Log in below :

successfully installed bundler-1.3.5
1 gem installed
Installing ri documentation for bundler-1.3.5...
Installing RDoc documentation for bundler-1.3.5...
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using ffi (1.9.1) 
Using mime-types (1.25) 
Using ethon (0.6.1) 
Using json (1.8.1) 
Using mini_portile (0.5.2) 
Installing nokogiri (1.6.0)

Gem::InstallError: nokogiri requires Ruby version >= 1.9.2.
An error occurred while installing nokogiri (1.6.0), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.0'` succeeds before bundling.

And my Ruby version is : (ruby -v)

ruby 1.9.2dev (2010-07-02) [i486-linux]

Any ideas would be appreciated.

Hamed Kamrava
  • 12,359
  • 34
  • 87
  • 125

2 Answers2

2

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
LHH
  • 3,233
  • 1
  • 20
  • 27
  • First line: `Already installed newest version`. And the second line: `Error installing nokogiri: nokogiri requires Ruby version >= 1.9.2.` – Hamed Kamrava Oct 28 '13 at 06:38
  • 1
    Hope this will help you http://www.andrewsturges.com/2011/09/installing-nokogiri-with-rvm-on-ubuntu.html – LHH Oct 28 '13 at 06:43
  • Turned out I was using the default system Ruby (and thus installing all the gems there in /Library/Ruby/Gems) even though rbenv points to ruby-1.9.3 so that's why Nokogiri was complaining. Fixed this by adding this to $PATH, so rbenv loads before the system ruby: export PATH="$HOME/.rbenv/bin:$PATH" – LHH Oct 28 '13 at 07:01
  • Use ruby ruby 1.9.2p320 instead of ruby 1.9.2dev – LHH Oct 28 '13 at 07:30
0

try this : sudo apt-get install libxslt-dev

amit karsale
  • 740
  • 5
  • 14