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:
This will show your current version:
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
gem install bundler
There you go, you are ready to
bundle install again.