I have a problem with two vendored gems of a Rails 3.2 app. One gem is a Minitest extension, the other a piece of code which should use the Minitest extension in it's test suite. Since both are under development, both are vendored and not yet pushed to Rubygems.
To reproduce the issue, I've bootstrapped a bare Rails 3.2 app and added two gems to vendor/gems
: minitest-great_expectations (a working Minitest extension cloned from Github) and mygem
which only reports and tests it's VERSION.
First let's try with the minitest-great_expectations gem from path:
git clone https://github.com/svoop/minitest_sandbox.git
cd minitest_sandbox/vendor/gems/mygem/
cat Gemfile # note "path:"
bundle install # note "Using minitest-great_expectations (0.0.5) from source at ../minitest-great_expectations"
ruby test/lib/mygem/version_test.rb # => test_helper.rb:6 - cannot load such file -- minitest/great_expectations (LoadError)
And now the same with the minitest-great_expectations gem from Rubygems. Edit the Gemfile
and use the line without the "path:".
$EDITOR Gemfile # remove the "path: ..."
bundle install # note "Installing minitest-great_expectations (0.0.5)"
ruby test/lib/mygem/version_test.rb # => PASS
Reverting back will now work since the gem is installed. However, it doesn't matter whether the Gemfile contains the "path:" or not. Explicitly uninstall the gem with gem uninstall minitest-great_exceptions
and you're back to LoadError.
Any idea what's missing here?