- My app works.
- I was able to run tests before, and now for some reason I can't.
- What happened between now and then is that I vendorized
activesupport
(but I have since undone those changes, and in fact I am in a totally separate/unrelated branch). - Two commands I ran during my work on
activesupport
that I am unfamiliar with arebundle --deployment
andbundle --no-deployment
. Again, I believe I undid everything related to those changes (at least as far asgit status
is concerned - I always rungit status
, and am aware of all codebase changes).
I am aware that other people have had similar, but not this exact problem: https://stackoverflow.com/search?q=require+cannot+load+such+file+LoadError
I was playing around with vendorizing activesupport
following this:
How to vendor a modified version of active_support such that it is used in my Rails app?
And I had trouble when I tried pushing the vendorized activesupport
branch to staging
:
Where is 'elsewhere' in "run `bundle install` elsewhere"?
Anyway, the point is that my app works (i.e. all the gems are obviously installed, Gemfile
and Gemfile.lock
are intact), yet I cannot run tests:
/Users/bsimpson/.rvm/gems/ruby-2.0.0-p481@books/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- minitest/rails (LoadError)
from /Users/bsimpson/.rvm/gems/ruby-2.0.0-p481@books/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/bsimpson/.rvm/gems/ruby-2.0.0-p481@books/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/bsimpson/.rvm/gems/ruby-2.0.0-p481@books/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in `require'
from /Volumes/MyHD/Users/bsimpson/Dev/books/books/test/test_helper.rb:10:in `<top (required)>'
from test/controllers/photos_controller_test.rb:1:in `require'
from test/controllers/photos_controller_test.rb:1:in `<main>'
If I comment out line 10
of test/test_helper.rb
, it just complains about the next require
line.
dependencies.rb:229:in `require': cannot load such file -- minitest/rails/capybara (LoadError)
...
test/test_helper.rb:14:in `<top (required)>'
And when I comment out line 14
, it complains about the next require
line, and so on...
So it seems that in the test
environment, the gems aren't seen. Thoughts?
.bundle/config
---
BUNDLE_WITHOUT: development:test