rspec2 – rspec-rails 2.14.2 with Rails 4.2 InvalidURIError

我有宝石’rspec-rails’,’〜> 2.14.2’在我的宝石文件.
从Rails 4.1升级到Rails 4.2后,运行rspec时出现以下错误
Failure/Error: get 'api/...'
URI::InvalidURIError:
  the scheme http does not accept registry part: www.example.com:80api (or bad hostname?)

什么修复?

解决方法

添加/到路径修复了问题.

例如.:
get’api / …’=>得到’/ api / …’
post’api / …’=>帖子’/ api / …’
patch’api / …’=>补丁’/ api / …’
put’api / …’=>放’/ api / …’
等等

编辑:原因是here.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...