Sinatra: Rails 5.0/ Ruby 2.3.0 Compatibility

Created on 20 Jan 2016  路  3Comments  路  Source: sinatra/sinatra

I am trying to install the latest version of sinatra gem in my rails app( ruby version 2.3.0, rails version 5.0.0.beta1). It installs sinatra-1.0 when no version is specified, but when i specify version, say 1.4.6, it says

Bundler could not find compatible versions for gem "rack":
In snapshot (Gemfile.lock):
rack (= 2.0.0.alpha)

In Gemfile:
rails (< 5.1, >= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
railties (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
actionpack (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
rack (~> 2.x)

rails (< 5.1, >= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
  railties (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
    actionpack (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
      rack-test (~> 0.6.3) was resolved to 0.6.3, which depends on
        rack (>= 1.0)

rails (< 5.1, >= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
  railties (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
    actionpack (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
      rack-test (~> 0.6.3) was resolved to 0.6.3, which depends on
        rack (>= 1.0)

sinatra (= 1.4.6) was resolved to 1.4.6, which depends on
  rack (~> 1.4)

rails (< 5.1, >= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
  sprockets-rails (>= 2.0.0) was resolved to 3.0.0, which depends on
    sprockets (>= 3.0.0) was resolved to 3.5.2, which depends on
      rack (< 3, > 1)

Most helpful comment

@lesliev You can use the master branch now

All 3 comments

Please use the branch 2.2.0-alpha in your Gemfile for sinatra. We are working on a new release for Sinatra 2.0. Until that time, this fix should work.

gem 'sinatra', github: 'sinatra/sinatra', branch: '2.2.0-alpha'

Suboptimal, but should work. Ongoing discussion about this previously-reported problem is here: https://github.com/sinatra/sinatra/issues/1055

This branch doesn't seem to exist any more. Has Sinatra 2 moved to some other repo?

@lesliev You can use the master branch now

Was this page helpful?
0 / 5 - 0 ratings