You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
If I am in directory that contains Gemfile and Gemfile.lock, running a bundler/inline script does not work as I expect.
Expected behavior
Any missing gems in the inline gem declaration will be installed.
Actual behavior
Bundler::GemNotFound is raised.
Tested with
Bundler 1.13.6
Ruby 2.3.1
RubyGems 2.6.7
$ cat Gemfile
source "https://rubygems.org"
gem "rake"
$ cat test.rb
#!/usr/bin/env ruby
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "whirly"
end
puts "Done"
$ bundle install
$ ruby test.rb
/Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:366:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'whirly' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:341:in `each'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:341:in `verify_gemfile_dependencies_are_found!'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:199:in `start'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:181:in `resolve'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/definition.rb:250:in `resolve'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/definition.rb:174:in `specs'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/installer.rb:171:in `ensure_specs_are_compatible!'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/installer.rb:79:in `run'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/installer.rb:24:in `install'
from /Users/mbrictson/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/inline.rb:63:in `gemfile'
from test.rb:3:in `<main>'
Removing the lock file from the working directory fixes the problem:
$ rm Gemfile.lock
$ ruby test.rb
Done
The text was updated successfully, but these errors were encountered:
…iddins
Dont build defintion with Gemfile.lock (if present) when resolving gems via inline gemfile
This fixes#5117
I am passing an option to `Installer` to not build a definition when resolving gems via inline gemfile.
Also, i notice: `Bundler.default_lockfile.exist? && !options["update"]...`. Is "update" suppose to be a string? I ask because i noticed that other options are being passed as symbols, so I'm not which i'm suppose to be using.
Thanks.
PS. Hopefully i have the bundler terminology correct 😄
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I am in directory that contains Gemfile and Gemfile.lock, running a bundler/inline script does not work as I expect.
Expected behavior
Any missing gems in the inline gem declaration will be installed.
Actual behavior
Bundler::GemNotFound
is raised.Tested with
Bundler 1.13.6
Ruby 2.3.1
RubyGems 2.6.7
Removing the lock file from the working directory fixes the problem:
The text was updated successfully, but these errors were encountered: