- 我的应用程序可以运行。
- 我以前能够运行测试,但现在由于某种原因不能运行。
- 从现在到那时发生的事情是我供应商
activesupport
(但我已经撤消了这些更改,事实上我处于一个完全独立/不相关的分支中)。
- 我在工作期间运行的两个命令
activesupport
我不熟悉的是bundle --deployment
and bundle --no-deployment
。再说一遍,我believe我撤消了与这些更改相关的所有内容(至少到目前为止git status
被关注到- 我总是跑步git status
,并且了解所有代码库更改)。
我知道其他人也有类似的问题,但不是这个确切的问题:https://stackoverflow.com/search?q=require+cannot+load+such+file+LoadError https://stackoverflow.com/search?q=require+cannot+load+such+file+LoadError
我正在玩弄供应商activesupport
按照此:如何提供 active_support 的修改版本以便在我的 Rails 应用程序中使用? https://stackoverflow.com/questions/25603171/how-to-vendor-a-modified-version-of-active-support-such-that-it-is-used-in-my-ra
当我尝试推动供应商时,我遇到了麻烦activesupport
分支到staging
:
“在其他地方运行`bundle install`”中的“其他地方”在哪里? https://stackoverflow.com/questions/25612444/where-is-elsewhere-in-run-bundle-install-elsewhere
无论如何,重点是我的应用程序可以运行(即所有宝石显然都已安装,Gemfile
and Gemfile.lock
完好无损),但我无法运行测试:
/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>'
如果我注释掉该行10
of test/test_helper.rb
,它只是抱怨下一个require
line.
dependencies.rb:229:in `require': cannot load such file -- minitest/rails/capybara (LoadError)
...
test/test_helper.rb:14:in `<top (required)>'
当我注释掉这一行时14
,它抱怨下一个require
线等等...
所以看来在test
环境,看不到宝石。想法?
.bundle/配置
---
BUNDLE_WITHOUT: development:test