加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 你应该需要’minitest / autorun’.在ruby的轨

发布时间:2020-12-16 21:47:04 所属栏目:百科 来源:网络整理
导读:我在rails上创建 ruby应用程序: 创建用户后,为验证用户,我正在运行以下命令: $bundle exec rake db:migrate$bundle exec rake test:prepare 两个命令都在rails commandLine上正常运行,但是当我运行以下命令时: $bundle exec rspec spec/models/user_spec.
我在rails上创建 ruby应用程序:

创建用户后,为验证用户,我正在运行以下命令:

$bundle exec rake db:migrate
$bundle exec rake test:prepare

两个命令都在rails commandLine上正常运行,但是当我运行以下命令时:

$bundle exec rspec spec/models/user_spec.rb

我以下错误:

Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'

而我正在使用4.1.1版本的rails.
我不明白为什么会这样.
请建议我,等待你的回复.
谢谢.

解决方法

在“Gemfile”中包含最小的gem,并运行bundle安装
gem install 'minitest'

然后捆绑安装

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读