Peterxwl
Peterxwl

Reputation: 1123

Error: mime-types-data requires Ruby version >= 2.0

I recently install clean ubuntu14.04 virtual machine in vware fusion and updated it. I am trying to install the mime-tyes-data by

sudo gem install mime-types-data -v 3.2015.1120

The error shows

ERROR: Error installing mime-types-data: mime-types-data requires Ruby version >= 2.0.

Before that I already update ruby version by

sudo apt-get install ruby2.0

sudo ln -sf /usr/bin/ruby2.0 /usr/bin/ruby

It seems my version of ruby is 2.0 already, but the error still exists.

Upvotes: 8

Views: 8917

Answers (4)

Minski
Minski

Reputation: 21

Fixed problem by downgrading from rails '4.2.6' to rails '4.1.0'.

Upvotes: 0

Scala Enthusiast
Scala Enthusiast

Reputation: 468

I had the same error as others here. I was trying to install JRuby and kept getting

ERROR: Error installing mime-types-data: mime-types-data requires Ruby version >= 2.0

From this page I got that JRuby doesn't use the version of ruby you might think it does. So you can check what it's using by doing:

jruby -v

The version of Ruby is in brackets. Then to upgrade the version of Ruby being used I got a tip from this page which said to add an env var:

set JRUBY_OPTS=--2.0

All working better now, well no error anymore!

Upvotes: 4

Allan Oliveira
Allan Oliveira

Reputation: 125

I was facing the same problem trying to install rails with sudo. I was getting: ERROR: Error installing mime-types-data: mime-types-data requires Ruby version >= 2.0.

The thing is ruby -v gives me ruby 2.2.1p85 while sudo ruby -v gives me ruby 1.9.3p484, so instead of sudo gem install rails I just did gem install rails and it worked.

That is where I found my solution: https://github.com/jekyll/jekyll/issues/3558

Hope it helps.

Upvotes: 10

To fix, edit Gemfile

gem "mime-types", '2.6.2'

Then run in terminal.

sudo apt-get install -f

if that does not work, try

sudo apt-get update
sudo apt-get dist-upgrade

as the update to bbb-record-core now includes the above fix

Upvotes: 2

Related Questions