Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Problem with inline gemfiles in 1.16.0.pre2 #6072

Closed
deivid-rodriguez opened this issue Oct 1, 2017 · 14 comments · Fixed by rails/rails#31543
Closed

Problem with inline gemfiles in 1.16.0.pre2 #6072

deivid-rodriguez opened this issue Oct 1, 2017 · 14 comments · Fixed by rails/rails#31543

Comments

@deivid-rodriguez
Copy link
Member

test.rb
require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  gem "thor"
end
With bundler 1.15.4
$ ruby test.rb 
Fetching gem metadata from https://rubygems.org/.
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Using bundler 1.15.4
Using thor 0.20.0 (was 0.19.4)
With bundler 1.16.0.pre.2
$ ruby test.rb
Fetching gem metadata from https://rubygems.org/.
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/.....
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies...
Using bundler 1.16.0.pre.2
Using thor 0.20.0 (was 0.19.4)
/home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:30:in `block in setup': thor-0.20.0 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
	from /home/deivid/.rubies/ruby-2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/deivid/.rubies/ruby-2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:28:in `map'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:28:in `setup'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.2/lib/bundler/inline.rb:70:in `gemfile'
	from test.rb:3:in `<main>'
@olleolleolle
Copy link
Member

I tried again, with v1.16.0.pre.3:

$ ruby test.rb
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 1.16.0.pre.3
Using thor 0.20.0

Environment:

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
$ bundle -v
Bundler version 1.16.0.pre.3

@deivid-rodriguez
Copy link
Member Author

@olleolleolle Yes, it's fixed in 1.16.0.pre3. But more complicated cases still fail...

test.rb

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin', require: false

  gem 'activerecord-jdbcsqlite3-adapter',
      git: 'https://github.com/jruby/activerecord-jdbc-adapter',
      branch: 'rails-5',
      platform: :jruby
end

With bundler 1.15.4

Fetching https://github.com/activeadmin/activeadmin
The dependency activerecord-jdbcsqlite3-adapter (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching https://github.com/jruby/activerecord-jdbc-adapter
Fetching gem metadata from https://rubygems.org/..............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 12.1.0 (was 12.0.0)
Using concurrent-ruby 1.0.5
Using i18n 0.8.6 (was 0.8.4)
Using minitest 5.10.3 (was 5.10.2)
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubi 1.6.1 (was 1.6.0)
Using mini_portile2 2.3.0 (was 2.2.0)
Using crass 1.0.2
Using rack 2.0.3
Using formtastic_i18n 0.6.0
Using method_source 0.9.0 (was 0.8.2)
Using thor 0.20.0 (was 0.19.4)
Using kaminari-core 1.0.1
Using arel 8.0.0
Using rb-fsevent 0.10.2
Using ffi 1.9.18
Using babel-source 5.8.35
Using execjs 2.7.0
Using bundler 1.15.4
Using tzinfo 1.2.3
Using nokogiri 1.8.1 (was 1.8.0)
Using rack-test 0.7.0 (was 0.6.3)
Using sprockets 3.7.1
Using rb-inotify 0.9.10
Using babel-transpiler 0.7.0
Using activesupport 5.1.4 (was 5.1.1)
Using loofah 2.1.1 (was 2.0.3)
Using sass-listen 4.0.0
Using sprockets-es6 0.9.2
Using rails-dom-testing 2.0.3
Using arbre 1.1.1
Using activemodel 5.1.4
Using rails-html-sanitizer 1.0.3
Using sass 3.5.2
Using activerecord 5.1.4
Using actionview 5.1.4 (was 5.1.1)
Using kaminari-activerecord 1.0.1
Using polyamorous 1.3.1
Using actionpack 5.1.4 (was 5.1.1)
Using kaminari-actionview 1.0.1
Using formtastic 3.1.5
Using has_scope 0.7.1
Using railties 5.1.4 (was 5.1.1)
Using ransack 1.8.3
Using kaminari 1.0.1
Using responders 2.4.0
Using jquery-rails 4.3.1
Using inherited_resources 1.7.2
Using activeadmin 2.0.0.alpha from https://github.com/activeadmin/activeadmin (at master@f28a4e0)

With bundler 1.16.0.pre.3

Fetching https://github.com/activeadmin/activeadmin
The dependency activerecord-jdbcsqlite3-adapter (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching https://github.com/jruby/activerecord-jdbc-adapter
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rubygems.org/.................
Fetching gem metadata from https://rubygems.org/.................
Resolving dependencies.....
Using rake 12.1.0 (was 12.0.0)
Using concurrent-ruby 1.0.5
Using i18n 0.8.6 (was 0.8.4)
Using minitest 5.10.3 (was 5.10.2)
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Using activesupport 5.1.4 (was 5.1.1)
Using builder 3.2.3
Using erubi 1.6.1 (was 1.6.0)
Using mini_portile2 2.3.0 (was 2.2.0)
Using nokogiri 1.8.1 (was 1.8.0)
Using rails-dom-testing 2.0.3
Using crass 1.0.2
Using loofah 2.1.1 (was 2.0.3)
Using rails-html-sanitizer 1.0.3
Using actionview 5.1.4 (was 5.1.1)
Using rack 2.0.3
Using rack-test 0.7.0 (was 0.6.3)
Using actionpack 5.1.4 (was 5.1.1)
Using arbre 1.1.1
Using formtastic 3.1.5
Using formtastic_i18n 0.6.0
Using has_scope 0.7.1
Using method_source 0.9.0 (was 0.8.2)
Using thor 0.20.0 (was 0.19.4)
Using railties 5.1.4 (was 5.1.1)
Using responders 2.4.0
Using inherited_resources 1.7.2
Using jquery-rails 4.3.1
Using kaminari-core 1.0.1
Using kaminari-actionview 1.0.1
Using activemodel 5.1.4
Using arel 8.0.0
Using activerecord 5.1.4
Using kaminari-activerecord 1.0.1
Using kaminari 1.0.1
Using polyamorous 1.3.1
Using ransack 1.8.3
Using rb-fsevent 0.10.2
Using ffi 1.9.18
Using rb-inotify 0.9.10
Using sass-listen 4.0.0
Using sass 3.5.2
Using sprockets 3.7.1
Using babel-source 5.8.35
Using execjs 2.7.0
Using babel-transpiler 0.7.0
Using sprockets-es6 0.9.2
Using activeadmin 2.0.0.alpha from https://github.com/activeadmin/activeadmin (at master@f28a4e0)
Using bundler 1.16.0.pre.3
/home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.3/lib/bundler/runtime.rb:30:in `block in setup': rake-12.1.0 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
	from /home/deivid/.rubies/ruby-2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/deivid/.rubies/ruby-2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.3/lib/bundler/runtime.rb:28:in `map'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.3/lib/bundler/runtime.rb:28:in `setup'
	from /home/deivid/.gem/ruby/2.4.2/gems/bundler-1.16.0.pre.3/lib/bundler/inline.rb:70:in `gemfile'
	from test.rb:3:in `<main>'

Can you reproduce it?

@segiddins
Copy link
Member

Out of curiosity, what is the output of bundle env in your current working directory?

@olleolleolle
Copy link
Member

@deivid-rodriguez Yes, I got the same output you did on that example.

(Follow-up: The install works when run without the last gem:)

  gem 'activerecord-jdbcsqlite3-adapter',
      git: 'https://github.com/jruby/activerecord-jdbc-adapter',
      branch: 'rails-5',
      platform: :jruby

@deivid-rodriguez
Copy link
Member Author

@segiddins Here it goes

Environment

Bundler       1.16.0.pre.3
  Platforms   ruby, x86_64-linux
Ruby          2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
  Full Path   /home/deivid/.rubies/ruby-2.4.2/bin/ruby
  Config Dir  /home/deivid/.rubies/ruby-2.4.2/etc
RubyGems      2.6.13
  Gem Home    /home/deivid/.gem/ruby/2.4.2
  Gem Path    /home/deivid/.gem/ruby/2.4.2:/home/deivid/.rubies/ruby-2.4.2/lib/ruby/gems/2.4.0
  User Path   /home/deivid/.gem/ruby/2.4.0
  Bin Dir     /home/deivid/.gem/ruby/2.4.2/bin
Tools         
  Git         2.14.2
  RVM         not installed
  rbenv       not installed
  chruby      0.3.9

Bundler Build Metadata

Built At          2017-10-05
Git SHA           d94616dd8
Released Version  true

Bundler settings

gem.test
  Set for the current user (/home/deivid/.bundle/config): "rspec"
gem.mit
  Set for the current user (/home/deivid/.bundle/config): true
gem.coc
  Set for the current user (/home/deivid/.bundle/config): true

Gemfile

Gemfile

source 'https://rubygems.org'

# Trick to use https without warnings and without having to specify full URLs
git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

# Optional dependencies
gem 'cancan'
gem 'pundit'

# Utility gems used in both development & test environments
gem 'rake'
gem 'parallel_tests'

# Debugging
gem 'pry' # Easily debug from your console with `binding.pry`

# Code style
gem 'rubocop', '0.49.1'
gem 'mdl', '0.4.0'

# Translations
gem 'i18n-tasks'

# Documentation
gem 'yard'                        # Documentation generator
gem 'redcarpet', platforms: :mri  # Markdown implementation (for yard)
gem 'kramdown', platforms: :jruby # Markdown implementation (for yard)

group :development do
  # Debugging
  gem 'better_errors' # Web UI to debug exceptions. Go to /__better_errors to access the latest one

  gem 'binding_of_caller', platforms: :mri # Retrieve the binding of a method's caller

  # Performance
  gem 'rack-mini-profiler' # Inline app profiler. See ?pp=help for options.
end

group :test do
  gem 'capybara'
  gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
  gem 'codecov', require: false # Test coverage website. Go to https://codecov.io
  gem 'cucumber-rails', require: false
  gem 'cucumber'
  gem 'database_cleaner'
  gem 'jasmine'
  gem 'launchy'
  gem 'rails-i18n' # Provides default i18n for many languages
  gem 'rspec-rails'
  gem 'i18n-spec'
  gem 'shoulda-matchers', '<= 2.8.0'
  gem 'sqlite3', platforms: :mri
  gem 'poltergeist'
end

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    actionpack (5.1.1)
      actionview (= 5.1.1)
      activesupport (= 5.1.1)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.1)
      activesupport (= 5.1.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activesupport (5.1.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.5.1)
      public_suffix (~> 2.0, >= 2.0.2)
    ast (2.3.0)
    better_errors (2.1.1)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
      rack (>= 0.9.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.2.3)
    byebug (9.0.6)
    cancan (1.6.10)
    capybara (2.14.3)
      addressable
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    cliver (0.3.2)
    codecov (0.1.10)
      json
      simplecov
      url
    coderay (1.1.1)
    concurrent-ruby (1.0.5)
    cucumber (2.4.0)
      builder (>= 2.1.2)
      cucumber-core (~> 1.5.0)
      cucumber-wire (~> 0.0.1)
      diff-lcs (>= 1.1.3)
      gherkin (~> 4.0)
      multi_json (>= 1.7.5, < 2.0)
      multi_test (>= 0.1.2)
    cucumber-core (1.5.0)
      gherkin (~> 4.0)
    cucumber-rails (1.5.0)
      capybara (>= 1.1.2, < 3)
      cucumber (>= 1.3.8, < 4)
      mime-types (>= 1.17, < 4)
      nokogiri (~> 1.5)
      railties (>= 4, < 5.2)
    cucumber-wire (0.0.1)
    database_cleaner (1.6.1)
    debug_inspector (0.0.3)
    diff-lcs (1.3)
    docile (1.1.5)
    easy_translate (0.5.0)
      json
      thread
      thread_safe
    erubi (1.6.0)
    erubis (2.7.0)
    gherkin (4.1.3)
    highline (1.7.8)
    i18n (0.8.4)
    i18n-spec (0.6.0)
      iso
    i18n-tasks (0.9.15)
      activesupport (>= 4.0.2)
      ast (>= 2.1.0)
      easy_translate (>= 0.5.0)
      erubis
      highline (>= 1.7.3)
      i18n
      parser (>= 2.2.3.0)
      rainbow (~> 2.2)
      terminal-table (>= 1.5.1)
    iso (0.2.2)
      i18n
    jasmine (2.6.0)
      jasmine-core (>= 2.6.0, < 3.0.0)
      phantomjs
      rack (>= 1.2.1)
      rake
    jasmine-core (2.6.4)
    jslint_on_rails (1.1.1)
    json (2.1.0)
    launchy (2.4.3)
      addressable (~> 2.3)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.2.0)
    minitest (5.10.2)
    multi_json (1.12.1)
    multi_test (0.1.2)
    nokogiri (1.8.0)
      mini_portile2 (~> 2.2.0)
    parallel (1.11.2)
    parallel_tests (2.14.1)
      parallel
    parser (2.4.0.0)
      ast (~> 2.2)
    phantomjs (2.1.1.0)
    poltergeist (1.15.0)
      capybara (~> 2.1)
      cliver (~> 0.3.1)
      websocket-driver (>= 0.2.0)
    powerpack (0.1.1)
    pry (0.10.4)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    public_suffix (2.0.5)
    pundit (1.1.0)
      activesupport (>= 3.0.0)
    rack (2.0.3)
    rack-mini-profiler (0.10.5)
      rack (>= 1.2.0)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    rails-i18n (5.0.4)
      i18n (~> 0.7)
      railties (~> 5.0)
    railties (5.1.1)
      actionpack (= 5.1.1)
      activesupport (= 5.1.1)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rainbow (2.2.2)
      rake
    rake (12.0.0)
    redcarpet (3.4.0)
    rspec-core (3.6.0)
      rspec-support (~> 3.6.0)
    rspec-expectations (3.6.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.6.0)
    rspec-mocks (3.6.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.6.0)
    rspec-rails (3.6.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 3.6.0)
      rspec-expectations (~> 3.6.0)
      rspec-mocks (~> 3.6.0)
      rspec-support (~> 3.6.0)
    rspec-support (3.6.0)
    rubocop (0.49.1)
      parallel (~> 1.10)
      parser (>= 2.3.3.1, < 3.0)
      powerpack (~> 0.1)
      rainbow (>= 1.99.1, < 3.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (~> 1.0, >= 1.0.1)
    ruby-progressbar (1.8.1)
    shoulda-matchers (2.8.0)
      activesupport (>= 3.0.0)
    simplecov (0.14.1)
      docile (~> 1.1.0)
      json (>= 1.8, < 3)
      simplecov-html (~> 0.10.0)
    simplecov-html (0.10.1)
    slop (3.6.0)
    sqlite3 (1.3.13)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thor (0.19.4)
    thread (0.2.2)
    thread_safe (0.3.6)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    unicode-display_width (1.2.1)
    url (0.3.2)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)
    xpath (2.1.0)
      nokogiri (~> 1.3)
    yard (0.9.9)

PLATFORMS
  ruby

DEPENDENCIES
  better_errors
  binding_of_caller
  byebug
  cancan
  capybara
  codecov
  cucumber
  cucumber-rails
  database_cleaner
  i18n-spec
  i18n-tasks
  jasmine
  jslint_on_rails
  kramdown
  launchy
  parallel_tests
  poltergeist
  pry
  pundit
  rack-mini-profiler
  rails-i18n
  rake
  redcarpet
  rspec-rails
  rubocop (= 0.49.1)
  shoulda-matchers (<= 2.8.0)
  simplecov
  sqlite3
  yard

BUNDLED WITH
   1.15.1

@segiddins
Copy link
Member

Thanks — I’m guessing is the problem is the inline install is somehow picking up the lockfile

@deivid-rodriguez
Copy link
Member Author

@segiddins Just tried on a clean folder and same thing happens...

@colby-swandale
Copy link
Member

I can reproduce this issue without the Gemfile as well

@segiddins segiddins added this to the 1.16.0 milestone Oct 18, 2017
@segiddins
Copy link
Member

Hmm, when I throw this into a test it passes:

diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index dcaba3ab9..bfccb9955 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -267,4 +267,23 @@ RSpec.describe "bundler/inline#gemfile" do
     expect(last_command).to be_success
     expect(last_command.stdout).to eq "1.0.0"
   end
+
+  it "installs complicated gemfiles with conditionals" do
+    script(<<-RUBY)
+      require "bundler/inline"
+      gemfile(true) do
+        source "https://rubygems.org"
+      
+        gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin', require: false
+      
+        gem 'activerecord-jdbcsqlite3-adapter',
+            git: 'https://github.com/jruby/activerecord-jdbc-adapter',
+            branch: 'rails-5',
+            platform: :jruby
+      end
+    RUBY
+
+    puts(out)
+    expect(last_command).to be_success
+  end
 end

@segiddins
Copy link
Member

@colby-swandale I'm tempted to remove this as a blocker for 1.16.0 unless someone can add a failing test for it

@colby-swandale
Copy link
Member

@segiddins yea lets do it. I can't replicate this under test conditions

@segiddins segiddins removed this from the 1.16.0 milestone Oct 22, 2017
y-yagi added a commit to y-yagi/rails that referenced this issue Nov 1, 2017
It's causing bug report template tests to fail. https://travis-ci.org/rails/rails/jobs/295520851
This seems an issue of bundler. Ref: rubygems/bundler#6072
@y-yagi
Copy link
Contributor

y-yagi commented Nov 1, 2017

I encountered the same error when I specified path to inline gem in bundler 1.16.0.

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"
  gem "arel", path: "/path/to/arel/"
  gem "rails", path: "/path/to/rails/"
end
ruby inline_test.rb
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 12.2.1
Using concurrent-ruby 1.0.5
Using i18n 0.9.0
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.4
Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using builder 3.2.3
Using erubi 1.7.0
Using mini_portile2 2.3.0
Using nokogiri 1.8.1
Using rails-dom-testing 2.0.3
Using crass 1.0.2
Using loofah 2.1.1
Using rails-html-sanitizer 1.0.3
Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using rack 2.0.3
Using rack-test 0.7.0
Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using nio4r 2.1.0
Using websocket-extensions 0.1.2
Using websocket-driver 0.6.5
Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using globalid 0.4.1
Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using mini_mime 0.1.4
Using mail 2.7.0
Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using bundler 1.16.0
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
/home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile'
	from inline.rb:3:in `<main>' 

The problem seems to occur only if the gem is already installed and the following test fails.

diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index dcaba3a..8e14a0b 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -267,4 +267,30 @@ RSpec.describe "bundler/inline#gemfile" do
     expect(last_command).to be_success
     expect(last_command.stdout).to eq "1.0.0"
   end
+
+  it "use local path in inline gem" do
+    script(<<-RUBY)
+      require "bundler/inline"
+      gemfile(true) do
+        source "https://rubygems.org"
+        gem "arel", path: "/path/to/arel/"
+        gem "rails", path: "/path/to/rails/"
+      end
+    RUBY
+
+    puts(out)
+    expect(last_command).to be_success
+
+    script(<<-RUBY)
+      require "bundler/inline"
+      gemfile(true) do
+        source "https://rubygems.org"
+        gem "arel", path: "/path/to/arel/"
+        gem "rails", path: "/path/to/rails/"
+      end
+    RUBY
+
+    puts(out)
+    expect(last_command).to be_success
+  end
 end 
rspec spec/runtime/inline_spec.rb
Could not find 'automatiek' (~> 0.1.0) among 1363 total gem(s)
Checked in 'GEM_PATH=/home/yaginuma/.gem/ruby/2.4.0:/home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'mustache' (= 0.99.6) - did find: [mustache-1.0.5,mustache-1.0.3,mustache-0.99.8]
Checked in 'GEM_PATH=/home/yaginuma/.gem/ruby/2.4.0:/home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0', execute `gem env` for more information (Gem::MissingSpecVersionError)
Could not find 'rdiscount' (~> 2.2) among 1363 total gem(s)
Checked in 'GEM_PATH=/home/yaginuma/.gem/ruby/2.4.0:/home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'ronn' (~> 0.7.3) among 1363 total gem(s)
Checked in 'GEM_PATH=/home/yaginuma/.gem/ruby/2.4.0:/home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0', execute `gem env` for more information (Gem::MissingSpecError)
Install the ronn gem to build the help pages
man:build ran for   0.000000   0.000000   0.000000 (  0.000061)
Run options: exclude {:bundler=>"=< 1.16", :rubygems_master=>true, :git=>"=< 2.7.4", :rubygems=>"=< 2.6.13", :ruby=>"=< 2.4.1", :realworld=>true, :sudo=>true}

bundler/inline#gemfile
  requires the gems
  lets me use my own ui object
  raises an exception if passed unknown arguments
  does not mutate the option argument
  installs quietly if necessary when the install option is not set
  installs quietly from git if necessary when the install option is not set
  allows calling gemfile twice
  installs inline gems when a Gemfile.lock is present
  installs inline gems when BUNDLE_GEMFILE is set to an empty string
  installs inline gems when BUNDLE_BIN is set
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Fetching rake 12.2.1
Installing rake 12.2.1
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.0
Installing i18n 0.9.0
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.4
Installing tzinfo 1.2.4
Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.0
Installing erubi 1.7.0
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching nokogiri 1.8.1
Installing nokogiri 1.8.1 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.2
Installing crass 1.0.2
Fetching loofah 2.1.1
Installing loofah 2.1.1
Fetching rails-html-sanitizer 1.0.3
Installing rails-html-sanitizer 1.0.3
Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching rack 2.0.3
Installing rack 2.0.3
Fetching rack-test 0.7.0
Installing rack-test 0.7.0
Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching nio4r 2.1.0
Installing nio4r 2.1.0 with native extensions
Fetching websocket-extensions 0.1.2
Installing websocket-extensions 0.1.2
Fetching websocket-driver 0.6.5
Installing websocket-driver 0.6.5 with native extensions
Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching globalid 0.4.1
Installing globalid 0.4.1
Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching mini_mime 0.1.4
Installing mini_mime 0.1.4
Fetching mail 2.7.0
Installing mail 2.7.0
Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using bundler 1.16.0
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching thor 0.20.0
Installing thor 0.20.0
Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching sprockets 3.7.1
Installing sprockets 3.7.1
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
/home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `map'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `setup'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/inline.rb:70:in `gemfile'
	from -e:4:in `<main>'
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 12.2.1
Using concurrent-ruby 1.0.5
Using i18n 0.9.0
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.4
Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using builder 3.2.3
Using erubi 1.7.0
Using mini_portile2 2.3.0
Using nokogiri 1.8.1
Using rails-dom-testing 2.0.3
Using crass 1.0.2
Using loofah 2.1.1
Using rails-html-sanitizer 1.0.3
Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using rack 2.0.3
Using rack-test 0.7.0
Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using nio4r 2.1.0
Using websocket-extensions 0.1.2
Using websocket-driver 0.6.5
Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using globalid 0.4.1
Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using mini_mime 0.1.4
Using mail 2.7.0
Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using bundler 1.16.0
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
$ /home/yaginuma/.rbenv/versions/2.4.1/bin/ruby -I/home/yaginuma/program/ruby/bundler/lib -e  \
  <<EOS
  require 'bundler/inline'
  
        require "bundler/inline"
        gemfile(true) do
          source "https://rubygems.org"
          gem "arel", path: "/home/yaginuma/program/rails/master_y_yagi/arel/"
          gem "rails", path: "/home/yaginuma/program/rails/master_y_yagi/rails/"
        end
EOS
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Fetching rake 12.2.1
Installing rake 12.2.1
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.0
Installing i18n 0.9.0
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.4
Installing tzinfo 1.2.4
Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.0
Installing erubi 1.7.0
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching nokogiri 1.8.1
Installing nokogiri 1.8.1 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.2
Installing crass 1.0.2
Fetching loofah 2.1.1
Installing loofah 2.1.1
Fetching rails-html-sanitizer 1.0.3
Installing rails-html-sanitizer 1.0.3
Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching rack 2.0.3
Installing rack 2.0.3
Fetching rack-test 0.7.0
Installing rack-test 0.7.0
Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching nio4r 2.1.0
Installing nio4r 2.1.0 with native extensions
Fetching websocket-extensions 0.1.2
Installing websocket-extensions 0.1.2
Fetching websocket-driver 0.6.5
Installing websocket-driver 0.6.5 with native extensions
Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching globalid 0.4.1
Installing globalid 0.4.1
Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching mini_mime 0.1.4
Installing mini_mime 0.1.4
Fetching mail 2.7.0
Installing mail 2.7.0
Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using bundler 1.16.0
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching thor 0.20.0
Installing thor 0.20.0
Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Fetching sprockets 3.7.1
Installing sprockets 3.7.1
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
# $? => 0

$ /home/yaginuma/.rbenv/versions/2.4.1/bin/ruby -I/home/yaginuma/program/ruby/bundler/lib -e  \
  <<EOS
  require 'bundler/inline'
  
        require "bundler/inline"
        gemfile(true) do
          source "https://rubygems.org"
          gem "arel", path: "/home/yaginuma/program/rails/master_y_yagi/arel/"
          gem "rails", path: "/home/yaginuma/program/rails/master_y_yagi/rails/"
        end
EOS
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 12.2.1
Using concurrent-ruby 1.0.5
Using i18n 0.9.0
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.4
Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using builder 3.2.3
Using erubi 1.7.0
Using mini_portile2 2.3.0
Using nokogiri 1.8.1
Using rails-dom-testing 2.0.3
Using crass 1.0.2
Using loofah 2.1.1
Using rails-html-sanitizer 1.0.3
Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using rack 2.0.3
Using rack-test 0.7.0
Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using nio4r 2.1.0
Using websocket-extensions 0.1.2
Using websocket-driver 0.6.5
Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using globalid 0.4.1
Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using mini_mime 0.1.4
Using mail 2.7.0
Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using bundler 1.16.0
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
/home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `map'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `setup'
	from /home/yaginuma/program/ruby/bundler/lib/bundler/inline.rb:70:in `gemfile'
	from -e:4:in `<main>'
# $? => 1
  use local path in inline gem (FAILED - 1)


Retried examples: 0

Failures:

  1) bundler/inline#gemfile use local path in inline gem
     Failure/Error: expect(last_command).to be_success
     
       expected `$ /home/yaginuma/.rbenv/versions/2.4.1/bin/ruby -I/home/yaginuma/program/ruby/bundler/lib -e  \
         <<E...l/"
                 gem "rails", path: "/home/yaginuma/program/rails/master_y_yagi/rails/"
               end
       EOS.success?` to return true, got false
     
       Commands:
       $ /home/yaginuma/.rbenv/versions/2.4.1/bin/ruby -I/home/yaginuma/program/ruby/bundler/lib -e  \
         <<EOS
         require 'bundler/inline'
         
               require "bundler/inline"
               gemfile(true) do
                 source "https://rubygems.org"
                 gem "arel", path: "/home/yaginuma/program/rails/master_y_yagi/arel/"
                 gem "rails", path: "/home/yaginuma/program/rails/master_y_yagi/rails/"
               end
       EOS
       Fetching gem metadata from https://rubygems.org/.............
       Fetching gem metadata from https://rubygems.org/..........
       Fetching gem metadata from https://rubygems.org/..........
       Resolving dependencies...
       Fetching rake 12.2.1
       Installing rake 12.2.1
       Fetching concurrent-ruby 1.0.5
       Installing concurrent-ruby 1.0.5
       Fetching i18n 0.9.0
       Installing i18n 0.9.0
       Fetching minitest 5.10.3
       Installing minitest 5.10.3
       Fetching thread_safe 0.3.6
       Installing thread_safe 0.3.6
       Fetching tzinfo 1.2.4
       Installing tzinfo 1.2.4
       Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching builder 3.2.3
       Installing builder 3.2.3
       Fetching erubi 1.7.0
       Installing erubi 1.7.0
       Fetching mini_portile2 2.3.0
       Installing mini_portile2 2.3.0
       Fetching nokogiri 1.8.1
       Installing nokogiri 1.8.1 with native extensions
       Fetching rails-dom-testing 2.0.3
       Installing rails-dom-testing 2.0.3
       Fetching crass 1.0.2
       Installing crass 1.0.2
       Fetching loofah 2.1.1
       Installing loofah 2.1.1
       Fetching rails-html-sanitizer 1.0.3
       Installing rails-html-sanitizer 1.0.3
       Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching rack 2.0.3
       Installing rack 2.0.3
       Fetching rack-test 0.7.0
       Installing rack-test 0.7.0
       Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching nio4r 2.1.0
       Installing nio4r 2.1.0 with native extensions
       Fetching websocket-extensions 0.1.2
       Installing websocket-extensions 0.1.2
       Fetching websocket-driver 0.6.5
       Installing websocket-driver 0.6.5 with native extensions
       Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching globalid 0.4.1
       Installing globalid 0.4.1
       Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching mini_mime 0.1.4
       Installing mini_mime 0.1.4
       Fetching mail 2.7.0
       Installing mail 2.7.0
       Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
       Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using bundler 1.16.0
       Fetching method_source 0.9.0
       Installing method_source 0.9.0
       Fetching thor 0.20.0
       Installing thor 0.20.0
       Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Fetching sprockets 3.7.1
       Installing sprockets 3.7.1
       Fetching sprockets-rails 3.2.1
       Installing sprockets-rails 3.2.1
       Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       # $? => 0
     
       $ /home/yaginuma/.rbenv/versions/2.4.1/bin/ruby -I/home/yaginuma/program/ruby/bundler/lib -e  \
         <<EOS
         require 'bundler/inline'
         
               require "bundler/inline"
               gemfile(true) do
                 source "https://rubygems.org"
                 gem "arel", path: "/home/yaginuma/program/rails/master_y_yagi/arel/"
                 gem "rails", path: "/home/yaginuma/program/rails/master_y_yagi/rails/"
               end
       EOS
       Fetching gem metadata from https://rubygems.org/.............
       Fetching gem metadata from https://rubygems.org/..........
       Fetching gem metadata from https://rubygems.org/..........
       Resolving dependencies...
       Using rake 12.2.1
       Using concurrent-ruby 1.0.5
       Using i18n 0.9.0
       Using minitest 5.10.3
       Using thread_safe 0.3.6
       Using tzinfo 1.2.4
       Using activesupport 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using builder 3.2.3
       Using erubi 1.7.0
       Using mini_portile2 2.3.0
       Using nokogiri 1.8.1
       Using rails-dom-testing 2.0.3
       Using crass 1.0.2
       Using loofah 2.1.1
       Using rails-html-sanitizer 1.0.3
       Using actionview 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using rack 2.0.3
       Using rack-test 0.7.0
       Using actionpack 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using nio4r 2.1.0
       Using websocket-extensions 0.1.2
       Using websocket-driver 0.6.5
       Using actioncable 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using globalid 0.4.1
       Using activejob 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using mini_mime 0.1.4
       Using mail 2.7.0
       Using actionmailer 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using activemodel 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using arel 9.0.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/arel`
       Using activerecord 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using activestorage 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using bundler 1.16.0
       Using method_source 0.9.0
       Using thor 0.20.0
       Using railties 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       Using sprockets 3.7.1
       Using sprockets-rails 3.2.1
       Using rails 5.2.0.alpha from source at `/home/yaginuma/program/rails/master_y_yagi/rails`
       /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
       	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
       	from /home/yaginuma/.rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
       	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `map'
       	from /home/yaginuma/program/ruby/bundler/lib/bundler/runtime.rb:26:in `setup'
       	from /home/yaginuma/program/ruby/bundler/lib/bundler/inline.rb:70:in `gemfile'
       	from -e:4:in `<main>'
       # $? => 1
     # ./spec/runtime/inline_spec.rb:294:in `block (2 levels) in <top (required)>'

Finished in 1 minute 28.1 seconds (files took 1.5 seconds to load)
11 examples, 1 failure

Failed examples:

rspec ./spec/runtime/inline_spec.rb:271 # bundler/inline#gemfile use local path in inline gem

yahonda added a commit to yahonda/rails that referenced this issue Nov 1, 2017
…em" error

when tested with ruby-head

This pull request attempts to ignore the following error
when tested with ruby-head which has bundler as a default gem.

```ruby
$ rvm @global do gem uninstall bundler --all --ignore-dependencies --executables
ERROR:  While executing gem ... (Gem::InstallError)

    gem "bundler" cannot be uninstalled because it is a default gem

The command "rvm @global do gem uninstall bundler --all --ignore-dependencies --executables" failed and exited with 1 during .
```

Refer https://travis-ci.org/rails/rails/jobs/295600391

This workaround should be removed once rubygems/bundler#6072 is addressed.
yahonda added a commit to yahonda/oracle-enhanced that referenced this issue Nov 10, 2017
Related with rails/rails#31039

$ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
$ bundler -v
Bundler version 1.16.0
$

```ruby
$ cd guides/bug_report_templates/
$ ruby active_record_gem.rb
... snip ...
/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile'
        from active_record_gem.rb:10:in `<main>'
$
```

```ruby
$ ruby active_record_gem_spec.rb
... snip ...
/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile'
        from active_record_gem_spec.rb:10:in `<main>'
$
```
yahonda added a commit to yahonda/oracle-enhanced that referenced this issue Nov 10, 2017
Related to rails/rails#31039

$ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
$ bundler -v
Bundler version 1.16.0
$

```ruby
$ cd guides/bug_report_templates/
$ ruby active_record_gem.rb
... snip ...
/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile'
        from active_record_gem.rb:10:in `<main>'
$
```

```ruby
$ ruby active_record_gem_spec.rb
... snip ...
/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:28:in `block in setup': rake-12.2.1 is missing. Run `bundle install` to get it. (Bundler::GemNotFound)
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/2.4.0/forwardable.rb:229:in `each'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup'
        from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile'
        from active_record_gem_spec.rb:10:in `<main>'
$
```
yahonda added a commit to rsim/oracle-enhanced that referenced this issue Nov 10, 2017
@indirect
Copy link
Member

@y-yagi thank you for the failing spec!

indirect added a commit that referenced this issue Nov 27, 2017
This fixes my test-case reproduction of #6072. I’m pretty sure it’s
because the double-check was overriding the locally installed index
specs with specs fetched from the RubyGems API, causing Bundler to
conclude that the gems aren’t installed, even though they are.
benoittgt added a commit to benoittgt/paperclip that referenced this issue Nov 28, 2017
Refer travis-ci.org/rails/rails/jobs/295600391#L1801

This workaround should be removed once rubygems/bundler#6072 is addressed.
bundlerbot added a commit that referenced this issue Nov 29, 2017
Stop overriding specs during double-checks

This fixes my test-case reproduction of #6072. I’m pretty sure it’s because
the double-check was overriding the locally installed index specs with
specs fetched from the RubyGems API, causing Bundler to conclude that the
gems aren’t installed, even though they are.

@deivid-rodriguez @y-yagi can you verify that this patch fixes the issues with `inline` that you were seeing?
bundlerbot added a commit that referenced this issue Nov 30, 2017
Stop overriding specs during double-checks

This fixes my test-case reproduction of #6072. I’m pretty sure it’s because
the double-check was overriding the locally installed index specs with
specs fetched from the RubyGems API, causing Bundler to conclude that the
gems aren’t installed, even though they are.

@deivid-rodriguez @y-yagi can you verify that this patch fixes the issues with `inline` that you were seeing?
hsbt pushed a commit to hsbt/bundler that referenced this issue Dec 11, 2017
Stop overriding specs during double-checks

This fixes my test-case reproduction of rubygems#6072. I’m pretty sure it’s because
the double-check was overriding the locally installed index specs with
specs fetched from the RubyGems API, causing Bundler to conclude that the
gems aren’t installed, even though they are.

@deivid-rodriguez @y-yagi can you verify that this patch fixes the issues with `inline` that you were seeing?
segiddins pushed a commit that referenced this issue Dec 12, 2017
Stop overriding specs during double-checks

This fixes my test-case reproduction of #6072. I’m pretty sure it’s because
the double-check was overriding the locally installed index specs with
specs fetched from the RubyGems API, causing Bundler to conclude that the
gems aren’t installed, even though they are.

@deivid-rodriguez @y-yagi can you verify that this patch fixes the issues with `inline` that you were seeing?

(cherry picked from commit 953acf7)
@segiddins
Copy link
Member

This should be fixed by #6188.

yahonda added a commit to yahonda/oracle-enhanced that referenced this issue Dec 24, 2017
yahonda added a commit to yahonda/oracle-enhanced that referenced this issue Dec 25, 2017
yahonda added a commit to rsim/oracle-enhanced that referenced this issue Dec 25, 2017
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Mar 14, 2018
## 1.16.1 (2017-12-12)

Bugfixes:

  - avoid hanging on complex resolver errors ([#6114](rubygems/bundler#6114), @halfbyte)
  - avoid an error when running `bundle update --group` ([#6156](rubygems/bundler#6156), @mattbrictson)
  - ensure the resolver prefers non-pre-release gems when possible ([#6181](rubygems/bundler#6181), @greysteil)
  - include bundler's gemspec in the built gem ([#6165](rubygems/bundler#6165), @dr-itz)
  - ensure locally installed specs are not overriden by those in remote sources during dependency resolution ([#6072](rubygems/bundler#6072), @indirect)
  - ensure custom gemfiles are respected in generated binstubs (@pftg)
  - fail gracefully when loading a bundler-generated binstub when `bin/bundle` was not generated by bundler ([#6149](rubygems/bundler#6149), @hsbt)
  - allow `bundle init` to be run even when a parent directory contains a gemfile ([#6205](rubygems/bundler#6205), @colby-swandale)

## 1.16.0 (2017-10-31)

Bugfixes:

  - avoid new RubyGems warning about unsafe YAML loading (to keep output consistent) (@segiddins)
  - load digest subclasses in a thread-safe manner (@segiddins, @colby-swandale)
  - avoid unusued variable warnings under ruby 2.5 (@amatsuda)
  - fix printing the same message twice in verbose mode ([#6028](rubygems/bundler#6028), @akhramov)
  - allow `SignalException`s to bubble up to the interpreter during `bundle exec` ([#6090](rubygems/bundler#6090), @dekellum)
  - avoid activating stdlib digest under Ruby 2.5 (@segiddins)
  - prioritise explicitly requested gems in dependency resolution sort order (@segiddins)
  - reduce memory usage during dependency resolution ([#6114](rubygems/bundler#6114), @greysteil)
  - ensure that the default bundler gem is not accidentally activated on ruby 2.5 when using local git overrides (@segiddins)

## 1.16.0.pre.3 (2017-10-04)

Features:

  - the output from `bundle env` includes more information, particularly both the compiled & loaded versions of OpenSSL (@indirect)

Bugfixes:

  - fix a bug where installing on FreeBSD would accidentally raise an error (#6013, @olleolleolle)
  - fix a regression in 1.16 where pre-release gems could accidentally be resolved even when the gemfile contained no pre-release requirements (@greysteil)
  - bundler will avoid making unnecessary network requests to fetch dependency data, fixing a regression introduced in 1.16 (@segiddins)
  - the outdated bundler version message is disabled by default until the message has been fine-tuned (#6004, @segiddins)

## 1.16.0.pre.2 (2017-09-06)

Bugfixes:

  - handle when a connection is missing a socket when warning about OpenSSL version (@greysteil)
  - the description for the `rake release` task now reflects `$RUBYGEMS_HOST` (@wadetandy)
  - fix a bug where `bundle update` would regress transitive dependencies (@greysteil)

## 1.16.0.pre.1 (2017-09-04)

Features:

  - allow using non-branch symbolic refs in a git source (#4845, @segiddins)
  - allow absolute paths in the `cache path` setting (#5627, @mal)
  - gems created via `bundle gem` with rspec have `--require spec_helper` in their `.rspec` file (@koic)
  - `bundle env` includes `Gem.ruby` and the `bundle` binstub shebang when they don't match (#5616, @segiddins)
  - allow passing gem names to `bundle pristine` (@segiddins)
  - `bundle version` and `bundle env` include the commit and build date for the bundler gem (#5049, @segiddins)
  - add the `--shebang` option to `bundle binstubs` (#4070, @segiddins, @zorbash)
  - gemfiles are `eval`ed one fewer time when running `bundle install` (#4952, #3096, #4417, @segiddins)
  - the `fileutils` gem is now vendored so different versions of the gem can be activated (@segiddins)
  - speed up no-op installations (#5842, @segiddins)
  - default to keeping the lockfile in the default gem template (@deivid-rodriguez)
  - add a special bundler binstub that ensures the correct version of bundler is activated (#5876, @segiddins)
  - speed up dependency resolution and ensure that all resolvable gemfiles can be installed (@segiddins, @greysteil)
  - add a `bundle list` command that prints the gems in use (#4754, @colby-swandale)
  - allow adding credentials to a gem source during deployment when `allow_deployment_source_credential_changes` is set (@adrian-gomez)
  - making an outdated (and insecure) TLS connection to rubygems.org will print a warning (@segiddins)

Bugfixes:

  - allow configuring a mirror fallback timeout without a trailing slash (#4830, @segiddins)
  - fix handling of mirrors for file: urls that contain upper-case characters (@segiddins)
  - list the correct gem host for `rake release` when `allowed_push_host` has been set (@mdeering)
  - ensure `Bundler.original_env` preserves all env keys that bundler sets (#5700, @segiddins)
  - ensure `bundle pristine` removes files added to a git gem (@segiddins)
  - load plugin files from path gems before gem installation (#5429, @segiddins)
  - ensure gems containing manpages are properly set up (#5730, @segiddins)
  - avoid fetching remote specs when all effected gems are in groups that are not being installed (@segiddins)
  - allow `BUNDLE_GEMFILE` to be a relative path (#5712, @gxespino)
  - show a more helpful error message when a gem fails to install due to a corrupted lockfile (#5846, @segiddins)
  - add a process lock to allow multiple concurrent `bundle install`s (#5851, @stefansedich)
  - ensure that specifications always return an array for `#extensions` (@greysteil)
  - print a helpful error message when using a gem in the Gemfile with an empty name (@colby-swandale)
  - ensure that all gemfiles are included in `bundle env` (@segiddins)
  - use ssl client cert and ca cert settings from gem configuration as fallbacks (@stan3)
  - avoid global namespace pollution when loading gems (#5958, @shyouhei)
  - avoid running a complete re-resolve on `bundle update --bundler` (@segiddins)
  - allow `bundle binstubs --standalone` to work without `path` being set (@colby-swandale)
  - fix support for bundle paths that include jars or wars on jruby (#5975, @torcido)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants