2017-10-03 28 views
1

テストスイートはローカルに渡しています。しかしCircle CIでは、capybara(Rspec)を使って書いたすべての統合テストで以下のようなエラーが発生しています。Addressable :: URI :: InvalidURIError:権限が設定されていない2つのスラッシュを持つパスを持つことはできません: '//'

Failures: 

    1) the inspection access When inspector has no access removes inspection from table 
    Failure/Error: visit '/' 

    Addressable::URI::InvalidURIError: 
     Cannot have a path with two leading slashes without an authority set: '//' 
    # /home/ubuntu/.bundle_end_to_end/ruby/2.3.0/gems/addressable-2.5.2/lib/addressable/uri.rb:2429:in `validate' 
    # /home/ubuntu/.bundle_end_to_end/ruby/2.3.0/gems/addressable-2.5.2/lib/addressable/uri.rb:1538:in `path=' 
    # /home/ubuntu/.bundle_end_to_end/ruby/2.3.0/gems/capybara-2.15.2/lib/capybara/session.rb:265:in `visit' 
    # /home/ubuntu/.bundle_end_to_end/ruby/2.3.0/gems/capybara-2.15.2/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>' 
    # ./spec/support/sessions_management.rb:3:in `sign_in' 
    # ./spec/support/sessions_management.rb:19:in `sign_in_as' 
    # ./spec/inspection_access_spec.rb:11:in `block (3 levels) in <top (required)>' 

    2) the inspection access When inspector has access adds the inspection to the table 
    Failure/Error: visit '/' 

    Addressable::URI::InvalidURIError: 
     Cannot have a path with two leading slashes without an authority set: '//' 

Rails 4.2.8およびRuby 2.3.3。どのようなアイデアを検討する必要がありますか?

答えて

1

Capybara.app_hostには、末尾に「/」(例:Capybara.app_host = "http://www.example.com/")が設定されています。これはCapybara 2.15.2で '/'を訪問する際に問題を引き起こしています。できるだけ末尾の '/'(たとえばCapybara.app_host =http://www.example.com `)を削除するか、2.15.3がリリースされるまでCapybara 2.15.1にロールバックしてください。

+0

こんにちはThomas。はい、あなたは正しいです。私たちはそれを理解して解決しました。しかし、もう一度答えに時間を割いてくれてありがとう –

+1

@ArupRakshit FYI - 修正はCapybaraマスターにあります - 2.15.3は本日遅くリリースされる予定です –

関連する問題