dm8
dm8

Reputation: 31

github-pages gem failing even though I have Ruby version 2.1.2

I'm trying to install github pages gem on my Mac OS X (yosemite).

I get following error:

Gem::InstallError: github-pages requires Ruby version ~> 2.0.0.
An error occurred while installing github-pages (4), and Bundler cannot continue.
Make sure that `gem install github-pages -v '4'` succeeds before bundling.

I checked my Ruby version by running following command -

ruby --version

And it says

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

So I definitely have Ruby version ~> 2.0.0

Any assistance on this issue would be greatly appreciated!

Upvotes: 3

Views: 175

Answers (1)

Peter Giacomo Lombardo
Peter Giacomo Lombardo

Reputation: 712

There is a possible lack of important information here. Looking at your Ruby version, are you using rbenv or rvm?

I could imagine this happening if you use rbenv or rvm and then su or sudo to gem install github-pages. rbenv and rvm are specific to your user account and your shell environment. If you su or sudo to root, rbenv and rvm are no longer active.

The other possibility is that you are running it inside of a Bundler managed app that specifies another Ruby version in the Gemfile using the ruby x.x.x syntax.

If neither of these is the case, try running gem env to see what exactly rubygems thinks the story is. Also post the exact commands you are using to get this error.

Upvotes: 1

Related Questions