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

Could not find bundler (>=0) #13

Closed
nhessler opened this issue Nov 2, 2011 · 7 comments
Closed

Could not find bundler (>=0) #13

nhessler opened this issue Nov 2, 2011 · 7 comments

Comments

@nhessler
Copy link

nhessler commented Nov 2, 2011

I am getting error:

Could not find bundler (>= 0) amongst [aruba-0.4.5, bcat-0.6.1, builder-3.0.0, childprocess-0.2.0, cucumber-1.0.2, diff-lcs-1.1.2, ffi-1.0.9, gherkin-2.4.5, json-1.5.3, rack-1.3.2, rake-0.9.2, rdiscount-1.6.8, rspec-2.6.0, rspec-core-2.6.4, rspec-expectations-2.6.0, rspec-mocks-2.6.0, term-ansicolor-1.0.6] (Gem::LoadError)

I get the error in our app that uses appraisal and I'm getting the error in the appraisal cucumber features. for the appraisal app I run "bundle exec rake cucumber" and get the below failed scenarios with the error above. I am failing on step 'When I successfully run bundle exec rake appraisal:install --trace'

Failing Scenarios:
cucumber features/appraisals.feature:45 # Scenario: run a specific task with one appraisal
cucumber features/gemspec.feature:47 # Scenario: run a gem in the gemspec
cucumber features/gemspec.feature:60 # Scenario: run a gem in the gemspec via path

I vendor my gems to vendor/ruby and I'm the only one at work that does this. everyone else uses gemsets that I'm aware of and they can run the tests fine. I should also mention that I use rbenv and not rvm for my ruby version management although I don't see how that would be the problem.

@nhessler
Copy link
Author

nhessler commented Nov 3, 2011

I found that I can run the tests successfully if I just run Kernel.system(@command) and remove the wrapping with_clean_env block in Appraisal::Command#run I can get the tests to run successfully in our app, but does not seem to affect my ability to run the appraisal cucumber tests so even though I'm getting the same error the issues may not be related.

@jferris
Copy link
Member

jferris commented Nov 3, 2011

We don't vendor gems for libraries, which is where we use appraisal. We vendor gems for applications, and we don't use appraisal on applications since we can control exactly which version of every gem the application will deploy with.

Can you try not isolating the gems so we can isolate the problem?

@nhessler
Copy link
Author

nhessler commented Nov 3, 2011

What you've said makes total sense and we use appraisal in that way as well. So, if you don't vendor gems for libraries how do you manage your gems for libraries when developing on them? Is there a better way to manage gems for libraries that won't polute the global gem space? again I would prefer to not use gemsets and really can't anyway since I'm using rbenv and not rvm.

@jferris
Copy link
Member

jferris commented Nov 3, 2011

We haven't worried about gemsets or polluting the global gem space since we started using bundler. Since bundler does such a good job of isolating dependencies, we don't have to worry about what extra libraries or versions are installed.

@flavorjones
Copy link

I'm getting this issue as well, when trying to convert my gem to use appraisal for tests. I'm not vendoring anything.

I've got my code committed on a side branch, so it should be easily reproducible:

https://github.com/zilkey/active_hash/tree/appraisal

The error I get is:

bundle exec rake appraisal:install --traceinstall --trace
** Invoke appraisal:install (first_time)
** Invoke appraisal:gemfiles (first_time)
** Execute appraisal:gemfiles
** Execute appraisal:install
>> bundle install --gemfile=/home/mike/code/oss/active_hash/gemfiles/rails-2.3.2.gemfile
/home/mike/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [activesupport-3.1.0, appraisal-0.3.8, diff-lcs-1.1.3, multi_json-1.0.3, rake-0.9.2.2, rspec-2.2.0, rspec-core-2.6.4, rspec-expectations-2.6.0, rspec-mocks-2.6.0, sqlite3-1.3.4] (Gem::LoadError)
    from /home/mike/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
    from /home/mike/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems.rb:1200:in `gem'
    from /home/mike/.rvm/gems/ruby-1.8.7-p352/bin/bundle:18

Please let me know if I can provide any other useful information.

@mike-burns
Copy link
Contributor

Hi @flavorjones . We're unsure what's going on there. What if you add a dependency on Bundler to your active_hash gemspec? Odd, but it might work.

Thanks,
-Mike

@flavorjones
Copy link

shrug, whatever it was that was wrong, appears to go away when I use bundler 1.1.rc. I'm good!

phillbaker added a commit to phillbaker/appraisal that referenced this issue Sep 28, 2013
Appraisal seems to require Bundler to install the requirements of the Gemfile in the global namespace, see thoughtbot#13 and thoughtbot#30.
sikachu pushed a commit that referenced this issue Oct 29, 2013
Appraisal seems to require Bundler to install the requirements of the Gemfile in the global namespace, see #13 and #30.
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

4 participants