我的Gemfile里有gem '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?)解决办法是什么?
发布于 2014-11-29 10:38:36
将/添加到路径解决了问题。
例如:
get 'api/...' => get '/api/...'
post 'api/...' => post '/api/...'
patch 'api/...' => patch '/api/...'
put 'api/...' => put '/api/...'
等。
编辑:原因被解释为here。
https://stackoverflow.com/questions/27201294
复制相似问题