我正在运行rspec并遇到以下错误。我已经找过类似的帖子,但在这种情况下无法找到相关的帖子。
'require': cannot load such file -- rspec/core/formatters/base_formatter (LoadError)
Ruby版本:2.4.3
这是我的Gemfile:
group :test do
gem 'database_cleaner', '~> 1.5'
gem 'factory_girl'
gem 'rack-test', require: 'rack/test'
gem 'rspec', '~> 3.5'
gem 'simplecov'
gem 'webmock'
gem 'timecop'
end
这是实际的命令:
/Users/<user_name>/.rbenv/versions/2.4.3/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/<user_name>/.rbenv/versions/2.4.3/bin/rspec _3.7.1_ /Users/<user_name>/Desktop/github/test_rspec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
test_rspec.rb:
require 'spec_helper'
describe 'tests' do
include_context 'scenario'
# sample spec
end
答案 0 :(得分:0)
我有一个类似的问题,所以:
Gemfile.lock
bundle install