Sinatra: Could not find gem 'rack-protection (~> 2.0)', which is required by gem 'sinatra', in any of the sources.

Created on 25 Jul 2016  路  3Comments  路  Source: sinatra/sinatra

I was working with sinatra master since my upgrading to Rails 5, but today it seems there are some updates to the master, that throws the following error when I am trying to update the bundle.

The thrown error is:

Bundler could not find compatible versions for gem "rack-protection":
In Gemfile:
sinatra was resolved to 2.0.0.pre.alpha, which depends on
rack-protection (~> 2.0)

Could not find gem 'rack-protection (~> 2.0)', which is required by gem
'sinatra', in any of the sources.

Any help please?

Most helpful comment

Use github's version:

gem "rack-protection", :github => "sinatra/rack-protection"

All 3 comments

Use github's version:

gem "rack-protection", :github => "sinatra/rack-protection"

Thanks a million! It works for me.

For rails 6 helped to set the gem globally
gem install "rack-protection"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lvonk picture lvonk  路  5Comments

nickpelone picture nickpelone  路  5Comments

namusyaka picture namusyaka  路  3Comments

matsbror picture matsbror  路  4Comments

daveroberts picture daveroberts  路  5Comments