Gemfile.lock in Working Directory Causes Bundler version error
homerlex opened this issue · 3 comments
Description
We have a Rails application that we run in an Unbuntu VM. We recently updated the application and the Gemfile.lock file contains:
BUNDLED WITH
2.0.1
With the new BUNDLED WITH we get the following error when we try to bring up the vm (via vagrant up
)
Bringing machine 'default' up with 'virtualbox' provider...
The following berks command failed to execute:
D:\opscode\chefdk\bin\/berks.BAT --version --format json
The stdout and stderr are shown below:
stdout:
stderr: D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (2.0.1) required by your C:/Users/myuser/Documents/PatronManager/patronchimp-rails5-test2/Gemfile.lock. (Gem::MissingSpecVersionError)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.0.1`
Checked in 'GEM_PATH=C:/Users/myuser/AppData/Local/chefdk/gem/ruby/2.6.0;D:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0', execute `gem env` for more information
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize'
from D:/opscode/chefdk/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
from D:/opscode/chefdk/bin/berks:54:in `<main>'
The workaround for now is to manually edit our Gemifile.lock to set the BUNDLED WITH equal to 1.17.3 when we vagrant up
and then set it back.
Is this a known issue?
ChefDK Version
4.0.60
Platform Version
Windows 10
We don't ship Bundler 2.x in ChefDK so if you're using the built in bundler and you're working with a project that requires bundler 2.x it's going to fail. Bundler 2.x still has some issues and we're waiting for the next release before we pull it in.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.