Github-pages gem doesn't work even though I have Ruby version 2.1.2

I am trying to install the github gem on my Mac OS X (yosemite).

I am getting the 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 the following command:

ruby --version

      

And he says

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

      

So I definitely have Ruby version ~> 2.0.0

Any help on this would be greatly appreciated!

+3


source to share


1 answer


There may be a lack of important information. 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

for gem install github-pages. rbenv and rvm are specific to your user account and shell environment. If you are su

or sudo

for root, rbenv and rvm are no longer active.



Another possibility is that you run it inside a Bundler managed application that specifies a different Ruby version Gemfile

using the syntax ruby x.x.x

.

If not, try running gem env

to see what exactly Rubygems thinks. Also please post the exact commands you are using to get this error.

+1


source







All Articles