我正在尝试将Rails更新为5.0.0.beta1,我收到的错误如下:
Bundler could not find compatible versions for gem "minitest":
In Gemfile:
rails (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
activejob (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
activesupport (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends
on minitest (~> 5.1)
minitest-rails-capybara was resolved to 0.0.1, which depends on
minitest-rails was resolved to 0.5, which depends on
minitest (~> 4.0)
没有gem(包括minitest-rails-capybara
)在我的Gemfile中明确设置了它的版本。我的应用中没有Gemfile.lock
文件(我删除了升级分支中的现有文件。)
minitest-rails-capybara
是当前gemset中的最新版本(以及其他版本。)为什么我会收到此错误?
编辑即使在开始使用新应用(rails new
)之后,如果我将这些行添加到Gemfile中,我也会遇到以上错误:
group :test do
gem 'minitest-spec-rails'
gem 'minitest-rails-capybara'
end
版本:
答案 0 :(得分:0)
嗯,我想我在这里有点跳枪 - 这些宝石至少在Rubygems.org上没有Rails5兼容版本。
直接指向Github解决了这个问题:
gem 'minitest-rails', git: 'https://github.com/blowmage/minitest-rails', branch: 'rails5'
gem 'minitest-spec-rails'
gem 'minitest-rails-capybara', git: 'https://github.com/blowmage/minitest-rails-capybara', branch: 'rails5'