Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered

If you got this error:

Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered

The fix is to run:

gem update --system

Reference: