Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appraisal install problem with finding bundler gem #87

Closed
gazay opened this issue Mar 8, 2015 · 2 comments
Closed

appraisal install problem with finding bundler gem #87

gazay opened this issue Mar 8, 2015 · 2 comments

Comments

@gazay
Copy link

gazay commented Mar 8, 2015

I think this problem somehow exists because of my environment but I can't find it quickly.

  • I've created new repo for testing my own gem against different versions of other gems
  • I fill Appraisals file:
appraise "rails-3" do
  gem "rails", "3.2.21"
end

appraise "rails-4-0" do
  gem "rails", "4.0.13"
end

appraise "rails-4-1" do
  gem "rails", "4.1.9"
end

appraise "rails-4-2" do
  gem "rails", "4.2.0"
end
  • When I run appraisal install I get following error:
0:gon_tests:[master ✗]$ appraisal install
WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
>> bundle check --gemfile='/Users/alex/code/gon_tests/gemfiles/rails_3.gemfile' || bundle install --gemfile='/Users/alex/code/gon_tests/gemfiles/rails_3.gemfile'
/Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 65 total gem(s) (Gem::LoadError)
    from /Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
    from /Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /Users/alex/.gem/ruby/2.1.5/bin/bundle:22:in `<main>'
/Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 65 total gem(s) (Gem::LoadError)
    from /Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
    from /Users/alex/.rubies/ruby-2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /Users/alex/.gem/ruby/2.1.5/bin/bundle:22:in `<main>'
  • But if I run command from announce manually it just works:
0:gon_tests:[master ✗]$ bundle check --gemfile='/Users/alex/code/gon_tests/gemfiles/rails_3.gemfile' || bundle install --gemfile='/Users/alex/code/gon_tests/gemfiles/rails_3.gemfile'
The Gemfile's dependencies are satisfied

Do you have any idea how I can trace the problem?

@sikachu
Copy link
Contributor

sikachu commented Mar 9, 2015

Hi @gazay. Are you vendoring your gems by any chance? We currently have some limitation with vendoring gem because Bundler decides not to vendor itself when you install your gem in vendored location. (#30)

@gazay
Copy link
Author

gazay commented Mar 10, 2015

Yes, this was the problem. Thank you.

@gazay gazay closed this as completed Mar 10, 2015
sikachu pushed a commit that referenced this issue Mar 10, 2015
This fixes an issue where user would get "Could not find bundler" error
when tries to use Appraisal in project that vendorize gems.

The root cause was that Bundler will not bundle itself when you run
`bundle install` with `--path` option. As Appraisal resets `GEM_HOME`
to avoid dependency conflict, it also made RubyGems unable to locate
code for Bundler as well.

Fix #13, #30 and #87.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants