Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootsnap loads bundler from gems/ even though version in site_ruby/ is already activated #134

Closed
mattbrictson opened this issue Feb 20, 2018 · 12 comments

Comments

@mattbrictson
Copy link

Starting with rubygems 2.7.5, Bundler is pre-installed in the site_ruby directory. E.g.:

~/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler

You can still gem install bundler, at which point you will now have a second copy of Bundler here:

~/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1

Bootsnap can get confused in this scenario, leading it to load bundler again when it has already been loaded. We get lots of warnings about redeclared constants and then Bundler blows up with an error:

.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/constants.rb:4: warning: already initialized constant Bundler::WINDOWS
.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/constants.rb:4: warning: previous definition of WINDOWS was here
.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/constants.rb:5: warning: already initialized constant Bundler::FREEBSD
.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/constants.rb:5: warning: previous definition of FREEBSD was here
.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/constants.rb:6: warning: already initialized constant Bundler::NULL
[etc]
ArgumentError (Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered)

Steps to reproduce

Ensure you are running rubygems 2.7.5+

$ gem -v
2.7.6

Install bundler

$ gem install bundler --force

Make a new Gemfile with bootsnap in it

$ bundle init
$ echo 'gem "bootsnap", require: false' >> Gemfile
$ bundle install

Run the following ruby script (e.g. in irb)

require "bundler/setup" # ← this loads from site_ruby/
env = ENV["RAILS_ENV"] || "development"
require "bootsnap"
Bootsnap.setup(
  cache_dir:            ".",
  development_mode:     env == "development",
  load_path_cache:      true,
  autoload_paths_cache: false,
  disable_trace:        false,
  compile_cache_iseq:   true,
  compile_cache_yaml:   true
)
require "bundler" # ← this erroneously loads again, from gems/

This reliably produces:

Traceback (most recent call last):
       11: from /Users/mbrictson/.rbenv/versions/2.5.0/bin/irb:11:in `<main>'
       10: from (irb):13
        9: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        8: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        7: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:10:in `<main>'
        6: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        5: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        4: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:3:in `<main>'
        3: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:20:in `<module:Bundler>'
        2: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:20:in `<class:GemfileError>'
        1: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:9:in `status_code'
ArgumentError (Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered)

I believe this is the root cause behind bkeepers/dotenv#321 and also perhaps #103.

@jamesstonehill
Copy link

jamesstonehill commented Feb 23, 2018

Yeah, I'm having this issue also with this docker image that has bundler 1.16.0 pre-installed.

@wellington1993
Copy link

Hi, I removed require 'bootsnap/setup' from boot.rb and worked for me.

@ojab
Copy link
Contributor

ojab commented Feb 25, 2018

Can you please check if #136 fixes the issue? You can try it with gem 'bootsnap', github: 'ojab/bootsnap', require: false in Gemfile.

@mattbrictson
Copy link
Author

@ojab unfortunately no, that did not work. I tried your fork and cleared out the bootsnap cache, and I still get the same error:

Traceback (most recent call last):
       11: from /Users/mbrictson/.rbenv/versions/2.5.0/bin/irb:11:in `<main>'
       10: from (irb):13
        9: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/bootsnap-6ca787a1e9ce/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        8: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/bootsnap-6ca787a1e9ce/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        7: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:10:in `<main>'
        6: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/bootsnap-6ca787a1e9ce/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        5: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems/bootsnap-6ca787a1e9ce/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        4: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:3:in `<main>'
        3: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:20:in `<module:Bundler>'
        2: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:20:in `<class:GemfileError>'
        1: from /Users/mbrictson/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/errors.rb:9:in `status_code'
ArgumentError (Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered)

@cjlarose
Copy link

cjlarose commented Feb 26, 2018

I've experienced this issue a bunch. However, I'm able to reproduce it even if I haven't ever issued gem install bundler (that is, I only have an installation of bundler in site_ruby)

See https://github.com/cjlarose/bootsnap-bundler-error-repro/tree/4a07aa87b139d043563d82131b2face04f7c59bb

I've got two Dockerfiles in that repro: one issues gem install bundler and the other doesn't. When executing @mattbrictson 's script on both images, I get the same error.

If I change my Gemfile to use @ojab 's fork, I get the same error on both images.

@mattbrictson
Copy link
Author

@cjlarose the ruby-2.3.6-alpine Docker image has two copies of bundler in it. You can see it does a gem install bundler --force here: https://github.com/docker-library/ruby/blob/019b9214a571d4dcb5a7e9e43ef192ca75ff27b8/2.3/alpine3.4/Dockerfile#L97

So I think both of your Dockerfiles are actually testing the same scenario.

But in any case, that's a really great repro! It shows that anyone using the official Ruby docker image is going to run into this bug.

@cjlarose
Copy link

cjlarose commented Feb 27, 2018

@mattbrictson Ah, that makes sense. I looked in gem env home to see if there was a bundler in there ls $(gem env home)/gems and it wasn't so I assumed I had only the bundler from /usr/local/lib/ruby/site_ruby/2.3.0/bundler.rb. I should have been more thorough. Turns out I have bundler in both

/usr/local/lib/ruby/site_ruby/2.3.0/bundler.rb

and

/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb

on that "single-bundler" image.

My load path contains both directories

irb(main):001:0> $LOAD_PATH
=> ["/usr/local/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib",
    "/usr/local/lib/ruby/site_ruby/2.3.0",
    "/usr/local/lib/ruby/site_ruby/2.3.0/x86_64-linux-musl",
    "/usr/local/lib/ruby/site_ruby",
    "/usr/local/lib/ruby/vendor_ruby/2.3.0",
    "/usr/local/lib/ruby/vendor_ruby/2.3.0/x86_64-linux-musl",
    "/usr/local/lib/ruby/vendor_ruby",
    "/usr/local/lib/ruby/2.3.0",
    "/usr/local/lib/ruby/2.3.0/x86_64-linux-musl"]

This explains why removing gem install bundler from my own app's Dockerfile did not solve the problem: I went from 3 bundlers to 2 bundlers. Thanks!

@ndbroadbent
Copy link

I've also been seeing this crash on my CI jobs. I fixed it by not loading bootsnap in the CI environment:

# config/boot.rb
require 'bootsnap/setup' unless ENV['CI']

This works fine for now, but I just realized that I could add the bootsnap cache to my CI cache and reuse it across builds. So it would be nice to make my tests a bit faster.

@burke
Copy link
Member

burke commented Mar 6, 2018

This should be fixed in version 1.2.0.pre -- please let me know whether this solves the problem or not.

@mattbrictson
Copy link
Author

Confirmed, this is fixed in 1.2.0.pre! Thanks! 🎉

@concept47
Copy link

Hi guys. I was hoping this would fix this issue but it didn't

I'm still getting this with rake tasks

rvm 1.27.0
mac OS 10.12.6
ruby 2.5.0
rails 5.0.6

rake -T
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:3: warning: already initialized constant Rake::VERSION
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:3: warning: previous definition of VERSION was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:6: warning: already initialized constant Rake::Version::MAJOR
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:6: warning: previous definition of MAJOR was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:6: warning: already initialized constant Rake::Version::MINOR
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:6: warning: previous definition of MINOR was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:6: warning: already initialized constant Rake::Version::BUILD
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:6: warning: previous definition of BUILD was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:6: warning: already initialized constant Rake::Version::OTHER
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:6: warning: previous definition of OTHER was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/version.rb:8: warning: already initialized constant Rake::Version::NUMBERS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/version.rb:8: warning: previous definition of NUMBERS was here
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/linked_list.rb:110: warning: already initialized constant Rake::LinkedList::EMPTY
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/linked_list.rb:110: warning: previous definition of EMPTY was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/scope.rb:41: warning: already initialized constant Rake::Scope::EMPTY
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/scope.rb:41: warning: previous definition of EMPTY was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils.rb:10: warning: already initialized constant FileUtils::RUBY
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils.rb:10: warning: previous definition of RUBY was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils.rb:109: warning: already initialized constant FileUtils::LN_SUPPORTED
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils.rb:109: warning: previous definition of LN_SUPPORTED was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils_ext.rb:17: warning: already initialized constant Rake::FileUtilsExt::DEFAULT
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils_ext.rb:17: warning: previous definition of DEFAULT was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:44: warning: already initialized constant Rake::FileList::ARRAY_METHODS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:44: warning: previous definition of ARRAY_METHODS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:47: warning: already initialized constant Rake::FileList::MUST_DEFINE
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:47: warning: previous definition of MUST_DEFINE was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:51: warning: already initialized constant Rake::FileList::MUST_NOT_DEFINE
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:51: warning: previous definition of MUST_NOT_DEFINE was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:55: warning: already initialized constant Rake::FileList::SPECIAL_RETURN
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:55: warning: previous definition of SPECIAL_RETURN was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:61: warning: already initialized constant Rake::FileList::DELEGATING_METHODS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:61: warning: previous definition of DELEGATING_METHODS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:86: warning: already initialized constant Rake::FileList::GLOB_PATTERN
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:86: warning: previous definition of GLOB_PATTERN was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:381: warning: already initialized constant Rake::FileList::DEFAULT_IGNORE_PATTERNS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:381: warning: previous definition of DEFAULT_IGNORE_PATTERNS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_list.rb:387: warning: already initialized constant Rake::FileList::DEFAULT_IGNORE_PROCS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb:387: warning: previous definition of DEFAULT_IGNORE_PROCS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/promise.rb:12: warning: already initialized constant Rake::Promise::NOT_SET
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/promise.rb:12: warning: previous definition of NOT_SET was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/application.rb:13: warning: already initialized constant Rake::CommandLineOptionError
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:13: warning: previous definition of CommandLineOptionError was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/application.rb:41: warning: already initialized constant Rake::Application::DEFAULT_RAKEFILES
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/application.rb:41: warning: previous definition of DEFAULT_RAKEFILES was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/task_arguments.rb:108: warning: already initialized constant Rake::EMPTY_TASK_ARGS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/task_arguments.rb:108: warning: previous definition of EMPTY_TASK_ARGS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/invocation_chain.rb:55: warning: already initialized constant Rake::InvocationChain::EMPTY
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/invocation_chain.rb:55: warning: previous definition of EMPTY was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/early_time.rb:21: warning: already initialized constant Rake::EARLY
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/early_time.rb:21: warning: previous definition of EARLY was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/late_time.rb:17: warning: already initialized constant Rake::LATE
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/late_time.rb:17: warning: previous definition of LATE was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/backtrace.rb:4: warning: already initialized constant Rake::Backtrace::SYS_KEYS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb:4: warning: previous definition of SYS_KEYS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/backtrace.rb:5: warning: already initialized constant Rake::Backtrace::SYS_PATHS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb:5: warning: previous definition of SYS_PATHS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/backtrace.rb:8: warning: already initialized constant Rake::Backtrace::SUPPRESSED_PATHS
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb:8: warning: previous definition of SUPPRESSED_PATHS was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/backtrace.rb:12: warning: already initialized constant Rake::Backtrace::SUPPRESSED_PATHS_RE
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb:12: warning: previous definition of SUPPRESSED_PATHS_RE was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/backtrace.rb:16: warning: already initialized constant Rake::Backtrace::SUPPRESS_PATTERN
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb:16: warning: previous definition of SUPPRESS_PATTERN was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake.rb:70: warning: already initialized constant FileList
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake.rb:70: warning: previous definition of FileList was here
/Users/xxxxxxx/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake.rb:71: warning: already initialized constant RakeFileUtils
/Users/xxxxxxx/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake.rb:71: warning: previous definition of RakeFileUtils was here

From the thread linked above, it seems its a bootsnap issue with a relative require somehere?

@concept47
Copy link

based on this, forcibly installing a duplicate copy of the rake gem into the current gemset fixes the problem by preempting the standard + @global gemset copy of rake

So I really can't tell if this is an rvm issue or a bootsnap one tbvh.

pixeltrix added a commit to guidance-guarantee-programme/planner that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants