When you’re using Bundler to manage your dependencies, there are a few different ways you can ensure that the correct versions of all your libraries get loaded:
All of these techniques work with RSpec. Let’s take a look at each one in turn.
The first option, Bundler.require, is convenient: it loads all your project’s gems, so you don’t have to remember to require each gem individually before use. But it has implications for your application’s boot time and maintainability, as Myron points out in his blog post.
The second option, bundle exec, is faster and avoids some of these maintainability pitfalls, ...