HEAD does not install #165

Closed
alexspeller opened this Issue Mar 26, 2013 · 16 comments

Projects

None yet

5 participants

@alexspeller

Similar but unrelated problem to earlier, HEAD is not actually installable from git:

Gemfile

gem 'ember-rails', git: 'git@github.com:emberjs/ember-rails.git'

Error

Bundler could not find compatible versions for gem "handlebars-source":
  In Gemfile:
    ember-rails (>= 0) ruby depends on
      handlebars-source (< 1.0.0.rc4, >= 1.0.0.rc3) ruby

    handlebars-source (1.0.10)
@machty
Member
machty commented Mar 27, 2013

Can you post any other relevant bits of your Gemfile? Do you specify a specific handlebars-source?

@alexspeller

It works now - I have no idea what changed or what I was doing wrong, but I'm assuming it's incompetence on my part as I tried to reproduce in a brand new railsapp and it worked fine. I think maybe it's because I was messing around with the gems for the issue I reported earlier. Sorry for the time wasting!

@polarblau

Actually, I'm seeing the same problem with a brand new Rails app. Here's my Gemfile:

gem 'rails', '4.0.0.beta1'
gem 'pg'

group :assets do
  gem 'sass-rails',   '~> 4.0.0.beta1'
  gem 'coffee-rails', '~> 4.0.0.beta1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'ember-rails', :git => 'git://github.com/emberjs/ember-rails.git'
gem 'active_model_serializers'
@alexspeller

I was using rails 3.2.13, I haven't tried rails 4 yet.

@polarblau

Here’s the error in detail:

Bundler could not find compatible versions for gem "handlebars-source":
  In Gemfile:
    ember-rails (>= 0) ruby depends on
      handlebars-source (< 1.0.0.rc4, >= 1.0.0.rc3) ruby

    ember-rails (>= 0) ruby depends on
      handlebars-source (1.0.0)

— Any ideas how this happens?

@polarblau

Requiring a suitable version of handlebars-source seems to help:

gem 'handlebars-source', '1.0.0.rc3'
@alexspeller alexspeller reopened this Mar 31, 2013
@alexspeller

I've reopened as it seems it's still an issue even if intermittent - this is the exact same error that I had, and suddenly it all started working again without me doing anything so I'm sure there must be something to it.

@machty
Member
machty commented Mar 31, 2013

@alexspeller What if anything happened between not working and working? As in, did you literally just try bundle followed by bundle and it failed and then worked?

@machty
Member
machty commented Mar 31, 2013

I can't figure out where in the world ember-rails specifics a dependency on handlebars-source v 1.0.0. If someone could help me track that down it'd go a long way toward fixing the problem, though I'm wondering if that's some sporadic default that just comes up every so often rather than being specifically listed in the dependencies somewhere?

@machty
Member
machty commented Mar 31, 2013

Then again, maybe I'm forgetting how these error messages work, but doesn't @polarblau's seem to indicate that there's two versions of ember-rails trying to resolve to two different versions of handlebars? Or is that just a weird way of presenting the error, when really what's happening is that ember-rails requires two gems that individually require two different versions of handlebars-source? If that's what's happening, we just need to find the gem (or figure out the logic) that requires handlebars-source 1.0.0, but I'm pretty sure the gems would have been specified in the error message.

@alexspeller

OK, I just reproduced this.

mkdir ~/tmp/ember-rails
cd ~/tmp/ember-rails
mate Gemfile

In the Gemfile

source 'https://rubygems.org'

gem 'rails', '4.0.0.beta1'
gem 'pg'

group :assets do
  gem 'sass-rails',   '~> 4.0.0.beta1'
  gem 'coffee-rails', '~> 4.0.0.beta1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'ember-rails', :git => 'git://github.com/emberjs/ember-rails.git'
gem 'active_model_serializers'
bundle

Result:

Updating git://github.com/emberjs/ember-rails.git
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "handlebars-source":
  In Gemfile:
    ember-rails (>= 0) ruby depends on
      handlebars-source (< 1.0.0.rc4, >= 1.0.0.rc3) ruby

    ember-rails (>= 0) ruby depends on
      handlebars-source (1.0.0)

Versions:

ruby -v
# ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]
bundle -v
# Bundler version 1.3.4
gem -v
# 2.0.0

I'm on OSX 10.8.3

@alexspeller

Exact same error with these versions:

ruby -v
# ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.0]
bundle -v
# Bundler version 1.3.4
gem -v
# 1.8.23
@alexspeller

Also, I have no idea what fixed it before - I now can't get it to work again :-(

I'm pretty sure I just typed bundle a few times and that resolved it. I also can't figure out where handlebars 1.0.0 is being specified as a dependency - is it maybe in the barber gemspec? That's got a dependency on handlebars.

Perhaps there is a bundler bug where it's not handling the version correctly?

I notice in the ember-source gemspec it says "Note: can't use the squiggly ~> operator the way we'd expect so long as we're referencing pre-release versions." - could this have something to do with the problem?

@chrisbenson

I'm having the exact same issue:

Bundler could not find compatible versions for gem "handlebars-source":
In Gemfile:
ember-rails (>= 0) ruby depends on
handlebars-source (< 1.0.0.rc4, >= 1.0.0.rc3) ruby

ember-rails (>= 0) ruby depends on
  handlebars-source (1.0.0)
@ootoovak
ootoovak commented Apr 5, 2013

Explicitly adding the handlebars-source gem seems to fix it (#168). Obviously a bug but that is a working workaround.

@chrisbenson

Thanks for the answer. Much appreciated!
I actually figured it out earlier today, but forgot to come back with the answer:

gem 'ember-rails', git: 'git://github.com/emberjs/ember-rails.git'
gem 'handlebars-source', '1.0.0.rc3'
@sly7-7 sly7-7 referenced this issue in dgeb/ember_data_example Apr 9, 2013
Closed

Setup Integration Tests #39

@cyril-sf cyril-sf added a commit to cyril-sf/ember-rails that referenced this issue Apr 28, 2013
@cyril-sf cyril-sf Update ember-source
[Fixes #165 #168]
4af7074
@cyril-sf cyril-sf added a commit to cyril-sf/ember-rails that referenced this issue Apr 28, 2013
@cyril-sf cyril-sf Update ember-source
[Fixes #165 #168]
20ef3d3
@stefanpenner stefanpenner pushed a commit that closed this issue Apr 28, 2013
@lukemelia lukemelia Test against latest Ember RC2 and RC3 gems, and Rails 3.1, 3.2 and 4,…
… and specify gem dependencies accordingly.

[Fixes #165 #168]
bfc38c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment