user5006554
user5006554

Reputation:

Can't install because I don't have high enough Ruby version, but I do

I'm trying to add a widget to a dashboard. I've cloned the widget to the correct directory and copied files over to the relevant locations. The final thing to do is run this line:

bundle install 

Everything goes well until I get line :

Gem::InstallError: activesupport requires Ruby version >= 2.2.2.

Make sure that `gem install activesupport -v '5.0.0.1'` succeeds before
bundling.

So I've installed that separately:

sudo gem install activesupport -v 5.0.0.1
Successfully installed activesupport-5.0.0.1

But when I try to run "bundle install" I get the same error.

I even checked by ruby version, and its high enough:

ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

What am I doing wrong? Is it choosing to use a lower version of ruby?

Upvotes: 2

Views: 1293

Answers (2)

Esteban Chaves
Esteban Chaves

Reputation: 41

I had the same issue and I finally solved running it as sudo:

sudo bundle install 

Be sure your Gemfile is in the same directory where you are running the command and just in case the Gemfile looks like this:

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

In the end you get something like this: ...

-------------------------------------------------
Thank you for installing html-pipeline!
You must bundle Filter gem dependencies.
See html-pipeline README.md for more details.
https://github.com/jch/html-pipeline#dependencies
-------------------------------------------------

Upvotes: 0

Maxim Fedotov
Maxim Fedotov

Reputation: 1357

Are you using RVM or Rbenv for managing Ruby? If so, you shouldn't use sudo to install that gem as it'll be placed in your system Ruby, which usually is lower version.

Upvotes: 1

Related Questions