【发布时间】:2014-09-02 21:24:05
【问题描述】:
- 我的应用可以正常工作。
- 我以前可以运行测试,但现在由于某种原因不能运行。
- 从现在到那时发生的事情是我对
activesupport进行了供应(但我已经撤消了这些更改,实际上我在一个完全独立/不相关的分支中)。 - 我在
activesupport上运行的两个我不熟悉的命令是bundle --deployment和bundle --no-deployment。同样,我相信我取消了与这些更改相关的所有内容(至少就git status而言 - 我总是运行git status,并且知道所有代码库变化)。
我知道其他人也有类似的问题,但不是这个确切的问题:https://stackoverflow.com/search?q=require+cannot+load+such+file+LoadError
我在玩弄供应商 activesupport 以下:
How to vendor a modified version of active_support such that it is used in my Rails app?
当我尝试将供应商化的activesupport 分支推送到staging 时遇到了麻烦:
Where is 'elsewhere' in "run `bundle install` elsewhere"?
无论如何,关键是 我的应用程序可以运行(即所有 gem 显然都已安装,Gemfile 和 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>'
如果我注释掉test/test_helper.rb 的10 行,它只会抱怨下一个require 行。
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/config
---
BUNDLE_WITHOUT: development:test
【问题讨论】:
-
你能把你的
.bundle/config文件的内容包括进来吗? -
谢谢。我已将其添加到我的问题中。
标签: ruby-on-rails git bundler