chef / appbundler

Generate locked binstubs for ruby applications
Apache License 2.0
14 stars 10 forks source link

binstubs shouldn't appbundle if they're running under bundler #33

Closed lamont-granquist closed 5 years ago

lamont-granquist commented 7 years ago

Trying to launch kitchen off a bundle using chef-dk:

$ bundle exec kitchen list
/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem': activesupport is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
    from /opt/chefdk/bin/kitchen:8:in `<main>'

That is caused by the appbundle -- chef-dk 2.x makes this worse since it pins the world, but chef-dk 1.x had the same behavior.

To run out of the bundle correctly:

$ bundle exec /opt/chefdk/embedded/bin/kitchen list

We could probably detect via BUNDLE_* env vars that we're being launched under a bundle and bypass appbundling since appbundling within a bundle is crossing the streams and will never work.

Even with the refactoring that I want to do of what goes into /opt/chefdk/embedded/bin and what goes into /opt/chefdk/bin the appbundle'd binstubs should always come first in the PATH, so this will always be a problem.

lamont-granquist commented 6 years ago

So that failed, see #42

lamont-granquist commented 5 years ago

43 fixed this a long time ago.