Knapsack Pro

Check out the new docs for the updated documentation.

FAQ / knapsack_pro / Common problems & solutions for knapsack_pro gem usage

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:



disable_exec_load (BUNDLE_DISABLE_EXEC_LOAD): Stop Bundler from using load to launch an executable in-process in bundle exec.


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 $0 or __FILE__) and the optimization can be disabled by enabling the disable_exec_load setting.


Start using Knapsack Pro

Sign up and speed up your tests.