我有gem 'rspec-rails', '~> 2.14.2'
我的Gemfile.
从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/...'
=> get '/api/...'
post 'api/...'
=> post '/api/...'
patch 'api/...'
=> patch '/api/...'
put 'api/...'
=> put '/api/...'
等
编辑:原因在这里解释.