This shouldn’t be an issue if you’re using Bundler properly since it modifies the $LOAD_PATH
so that only the gems listed in the Gemfile are able to be required. Ensure you are calling:
require 'bundler'
Bundler.setup
somewhere in your code. In some cases (notably gems) this will likely only be in tests. In applications themselves it’s typically in your “boot” file.