Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem::InstallError: celluloid requires Ruby version >= 1.9.2

I'm trying to install GitLab CI and I got this error.

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

However, I think my ruby is up to date.

# ruby --version
ruby 1.9.3p286 (2012-10-12 revision 37165) [i686-linux]

# ls -l /usr/bin/ruby
lrwxrwxrwx 1 root root 22 Jan 26 11:20 /usr/bin/ruby -> /etc/alternatives/ruby

# ls -l /etc/alternatives/ruby 
lrwxrwxrwx 1 root root 18 Jan 26 12:17 /etc/alternatives/ruby -> /usr/bin/ruby1.9.3

# rvm list
rvm rubies
=* ruby-1.9.3-p286 [ i686 ]

# which bundle
/usr/local/rvm/gems/ruby-1.9.3-p286@global/bin/bundle

# which gem
/usr/local/rvm/rubies/ruby-1.9.3-p286/bin/gem

Any idea what's wrong with me here..?

like image 245
Di Wu Avatar asked Jan 26 '13 04:01

Di Wu


People also ask

How do you update a Ruby gem to a specific version?

The correct way to update the version of a gem to a specific version is to specify the version you want in your Gemfile, then run bundle install . As for why your command line was failing, there is no -version option.

Is gem installed with Ruby?

Ruby comes with RubyGems by default since version 1.9, previous Ruby versions require RubyGems to be installed by hand.

What is gem file in Ruby?

A Gemfile is a file that is created to describe the gem dependencies required to run a Ruby program. A Gemfile should always be placed in the root of the project directory.

What is the use of Gem in Ruby?

RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them.


2 Answers

Most likely, your bundler or gem CLI tools are tied to an installation of Ruby 1.8.

Take a look at which bundle and which gem; and inspect those files - they are built pointing to a particular ruby installation by default.

(You probably need to install bundler for your current ruby version)

like image 182
Nevir Avatar answered Sep 27 '22 17:09

Nevir


I have this problem too. I use rbenv.

Here is my solution.

  1. Make sure your Ruby is loaded by rbenv
  2. $ gem install bundler
  3. $ rbev rehash

Now your gem should not pointed to your system Ruby.

like image 23
William Notowidagdo Avatar answered Sep 27 '22 16:09

William Notowidagdo