How to solve error cannot load such file -- stripe_mock (LoadError) when running tests with Cucumber?
When you use
knapsack_pro for Cucumber in Knapsack Pro Regular Mode (
bundle exec rake knapsack_pro:cucumber) you may have a problem with loading your project code because Knapsack Pro uses
Cucumber::Rake::Task. To solve issue like:
cannot load such file -- stripe_mock (LoadError)
You can set environment variable:
BUNDLE_DISABLE_EXEC_LOAD): Stop Bundler from using load to launch an executable in-process in
How does loading work in bundler?
By default, when attempting to
bundle exec to a file with a ruby shebang, Bundler will
Kernel.load that file instead of using
Kernel.exec. For the vast majority of cases, this is a performance improvement. In a rare few cases, this could cause some subtle side-effects (such as dependence on the exact contents of
__FILE__) and the optimization can be disabled by enabling the