This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly set
loaded_from
when use installed gem
In bundler 1.16.0, the following script using `bundler/inline` fails. ```ruby require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "rails", github: "rails/rails" gem "arel", github: "rails/arel" end ``` ``` $ ruby script.rb (snip) .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 .rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each' from .rbenv/versions/2.4.1/lib/ruby/2.4.0/forwardable.rb:229:in `each' from .rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `map' from .rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:26:in `setup' from .rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/inline.rb:70:in `gemfile' from script.rb:3:in `<main>' ``` When gem has already been installed, it seems that `loaded_from` is not set correctly, so set it up.
- Loading branch information