An error occurred while installing rack (2.0.1), and Bundler cannot continue.

Make sure that gem install rack -v '2.0.1' succeeds before bundling.

To fix this you need instead of install the gem like the warning says, first check your ruby version.

ERROR: Error installing rack:
rack requires Ruby version >= 2.2.2.

So be sure you are using a corresponding version of ruby.

If you are using rbenv do the next:

rbenv version  

This will show your current version:

2.1.5  

Try to use the version you need:

rbenv local 2.2.2  

If is not installed in y our system you will see this output:

rbenv: version `2.2.2' not installed  

Proceed to install:

rvenv install 2.2.2  

Then repeat the process:

rbenv local 2.2.2  
rbenv rehash  

After that

gem install bundler  

There you go, you are ready to bundle install again.

Victor Velazquez

Coder, Musician, Startups, Passionate Dancer & Life Lover. Software Engineer at MagmaLabs, Co-founder of Web Dev Talks, Co-founder of Voltaire, Co-founder of Paqkit, Ex-co-founder of Zaznova.

Subscribe to The zazvick's blog

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!