test-boosters icon indicating copy to clipboard operation
test-boosters copied to clipboard

Deprecation: Bundler.with_clean_env

Open pboling opened this issue 4 years ago • 3 comments

[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/semaphore_****_boosters-2.6.0/lib/****_boosters/shell.rb:32)

It is being triggered by this code: https://github.com/renderedtext/test-boosters/blob/master/lib/test_boosters/shell.rb#L32

    def with_clean_env
      defined?(Bundler) ? Bundler.with_clean_env { yield } : yield
    end

pboling avatar Feb 03 '21 21:02 pboling

For future searchers... This is fixed in several forks. Check out the Network view. :)

Update: Here's an example fixed repo: https://github.com/tobyndockerill/test-boosters, master branch

@renderedtext appears to be non-responsive on this repo.

pboling avatar Feb 09 '21 22:02 pboling

Had the same issue today using this gem in gitlab CI =>

[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /builds/[MASKED]/[MASKED]/vendor/bundle/ruby/2.7.0/gems/semaphore_test_boosters-2.7.1/lib/test_boosters/shell.rb:32)

@pboling you mentioned that this is fixed in several forks, do you have any recommendation on the one to use? All forks are mostly 0 stars

Mth0158 avatar Aug 02 '22 07:08 Mth0158

@Mth0158 I was using a forked copy of https://github.com/tobyndockerill/test-boosters, master branch.

pboling avatar Sep 12 '22 20:09 pboling