简体   繁体   中英

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..?

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)

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.

If you use debian-based linux, try sudo update-alternatives --config ruby and sudo update-alternatives --config gem . Helped me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM