Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sinatra Gem Conflict #1117
I have a sinatra app with this in the gemfile
I’m getting this error
Sinatra release 1.4.7 gem is not compatible with current master branch on github, this is because they target 2 different major versions of Rack.
So if you already installed Sinatra 1.4.7 (which depends on Rack ~> 1.5) in your Gemfile.lock, then trying to install master will fail.
You need to either remove the rack constraint, or change it, in order to use sinatra from master; and then update your Gemfile.lock.
Does that make sense?
I encountered the same error too. Here is my Gemfile
source "https://rubygems.org" gem 'bson_ext' gem 'grape' gem 'grape-entity' gem 'mongo' gem 'rake' gem 'sinatra' group :development do gem 'shotgun' end group :test do gem 'rack-test' gem 'rspec' end
I tried downgrading sinatra gem to '1.4.6' in the Gemfile but strangely I got
Here is my Gemfile.lock after downgrading to sinatra 1.4.6
GEM remote: https://rubygems.org/ specs: activesupport (4.2.6) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) bson (1.12.5) bson_ext (1.12.5) bson (~> 1.12.5) builder (3.2.2) coercible (1.0.0) descendants_tracker (~> 0.0.1) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) enumerable-lazy (0.0.1) equalizer (0.0.11) grape (0.16.2) activesupport builder hashie (>= 2.1.0) multi_json (>= 1.3.2) multi_xml (>= 0.5.2) mustermann19 (~> 0.4.3) rack (>= 1.3.0) rack-accept virtus (>= 1.0.0) grape-entity (0.5.1) activesupport multi_json (>= 1.3.2) hashie (3.4.4) i18n (0.7.0) ice_nine (0.11.2) json (1.8.3) minitest (5.9.0) mongo (1.12.5) bson (= 1.12.5) multi_json (1.12.1) multi_xml (0.5.5) mustermann19 (0.4.3) enumerable-lazy rack (1.6.4) rack-accept (0.4.5) rack (>= 0.4) rack-protection (1.5.3) rack rack-test (0.6.3) rack (>= 1.0) rake (11.1.2) rspec (3.4.0) rspec-core (~> 3.4.0) rspec-expectations (~> 3.4.0) rspec-mocks (~> 3.4.0) rspec-core (3.4.4) rspec-support (~> 3.4.0) rspec-expectations (3.4.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.4.0) rspec-mocks (3.4.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.4.0) rspec-support (3.4.1) shotgun (0.9.1) rack (>= 1.0) sinatra (1.4.6) rack (~> 1.4) rack-protection (~> 1.4) tilt (>= 1.3, < 3) thread_safe (0.3.5) tilt (2.0.4) tzinfo (1.2.2) thread_safe (~> 0.1) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) PLATFORMS ruby DEPENDENCIES bson_ext grape grape-entity mongo rack-test rake rspec shotgun sinatra (= 1.4.6) BUNDLED WITH 1.12.3
Thank you so much for getting back to me.
You have requested:
The bundle currently has rack locked at 1.6.4.
If you are updating multiple gems in your Gemfile at once,
I tried searching around, but can't find a way to remove the constraint or change it. Would you have any suggestions?
Just in case anyone had a conflict like I did.... I was running capybara from within my sinatra application for checking the health of another web application and was getting argument problems and something about rack versions. Once I removed the
added a commit
Aug 9, 2016
@zzak seem like you are aware of the same conflict, but if you want to use sinatra master because of rails 5 conflict... seems like there is no way right now to use sinatra-contrib because of its dependancy on sinatra ~>1.4.7....
Anyone else have this issue, or solve?