我是Rails的Django新手。我正在尝试让rspec-rails为我工作,但是当我运行时
$ bundle exec rails generate rspec:install
我知道了
Could not find diff-lcs-1.2.5 in any of the sources
Run `bundle install` to install missing gems.
这很麻烦,因为
diff-lcs (1.2.5)
在Gemfile.lock中还活着并且很好
我删除了Gemfile.lock并重新运行 bundle 无济于事。我也将gem'diff-lcs'添加到我的Gemfile中。
这就是我的gemfile中有rspec rails的方式
group :development, :test do
gem 'rspec-rails'
end
有小费吗?
最佳答案
如https://jasonplayne.com/web-dev/rails-generate-could-not-find-in-any-of-the-sources所述,杀死spring
进程已为我完成了工作。我看到在Rails 4.1中添加了spring loader的用法,但是我很好奇这里的交互作用以及如何解决这个问题而不必杀死spring。
关于ruby-on-rails - 运行生成rspec :install时找不到diff-lcs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25715499/