Closed danielsdeleo closed 8 years ago
I recreated a situation similar to https://github.com/chef/chef-dk/issues/718
Appbundler will now do this in that situation:
$ appbundler . ./appbundler-bin
Application 'ohai' contains gems in the lockfile which are
not accessible by rubygems. This usually occurs when you fetch gems from git in
your Gemfile and do not install the same version of the gems beforehand.
The Gemfile.lock is located here:
- /Users/ddeleo/oc/ohai/Gemfile.lock
The offending gems are:
- chef-config (12.9.0) from git://github.com/chef/chef.git (at 1ec54c1@1ec54c1)
Rubygems is configured to search the following paths:
- /Users/ddeleo/.gem/ruby/2.1.0
- /Users/ddeleo/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0
If these seem wrong, you might need to set GEM_HOME or other environment
variables before running appbundler
If I change the Gemfile to point at a Chef 12.8.1 commit (which I have installed), it works as before.
:+1:
:+1:
:+1: Thank you!
Adds a sanity check to ensure all git-sourced gems in the app's Gemfile.lock can be found by rubygems (using
Gem::Specification.find_by_name
). This makes appbundler fail in the case that the Gemfile.lock has gems installed from git which are not installed by other means; such executables are not viable, they will fail with errors like described in https://github.com/chef/chef-dk/issues/718