質問編集履歴
2
rspec-rails のversion追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
現在のバージョンは
|
18
18
|
`capybara (3.32.1)`
|
19
19
|
`selenium-webdriver (3.142.7)`
|
20
|
+
`rspec-rails (3.8.0)`
|
20
21
|
|
21
22
|
## 発生しているエラー
|
22
23
|
```
|
1
エラー内容変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
Everyday Rails
|
1
|
+
Everyday Rails のセットアップの時に、bin/rspec実行後VCR::Errors::UnhandledHTTPRequestErrorが表示される
|
body
CHANGED
@@ -1,31 +1,55 @@
|
|
1
|
-
Everyday
|
1
|
+
Everyday railsのセットアップを行なっておりますがbin/rspecを実行した際、こちらだけ通りません。
|
2
|
-
現在第1章から始めています。
|
3
|
-
指定のeveryrailsの`GitHub`に行き、
|
4
|
-
branchの所を`01-untested`に指定し、
|
5
|
-
`
|
2
|
+
`rspec ./spec/system/tasks_spec.rb:12 # Tasks user toggles a task`
|
6
|
-
cloud9でgit cloneコマンドを実行しました。
|
7
|
-
rspec-railsのversionを`'~> 3.6.0'`に変更し、bundle installを実行。
|
8
|
-
|
3
|
+
下記の発生しているエラーも翻訳して読んだのですが、
|
9
|
-
本の中では、`bin/rails generate rspec:install`を実行し、
|
10
|
-
ファイルなどを作成する指示なのですが、git cloneを実行したら既に作成されていました。
|
11
|
-
なので次に`bin/rspec`コマンドを実行すると下記のエラーが表示されてしまいます。
|
12
|
-
また`GitHub`のbranchの所を`master`に変更して、git cloneをしても同じ結果になります。
|
13
|
-
|
4
|
+
どうすればいいのか分かりませんでした。
|
14
5
|
ご教授頂ければ幸いです。
|
6
|
+
##試したこと
|
7
|
+
rubyのversionを2.4.9に変更。
|
8
|
+
[こちらの動画を参考](http://blog.jnito.com/entry/2019/10/15/085932)
|
9
|
+
更に、cloud9で開発しているので、
|
10
|
+
[参考記事](http://qiita.com/jnchito/items/f03934e8db01aec7cdc8)
|
11
|
+
こちらのコマンドでchromeをインストール。
|
12
|
+
`curl https://intoli.com/install-google-chrome.sh | bash`
|
13
|
+
更に、`gem 'chromedriver-helper'`をコメントアウトし、
|
14
|
+
`gem 'webdrivers'`を追記し、bundle installを実行。
|
15
|
+
更に、`gem 'capybara'`に変更し、
|
16
|
+
`bundle update selenium-webdriver capybara`を実行。
|
17
|
+
現在のバージョンは
|
18
|
+
`capybara (3.32.1)`
|
19
|
+
`selenium-webdriver (3.142.7)`
|
20
|
+
|
21
|
+
## 発生しているエラー
|
15
22
|
```
|
23
|
+
1) Tasks user toggles a task
|
24
|
+
Got 0 failures and 2 other errors:
|
16
|
-
Failure/Error:
|
25
|
+
1.1) Failure/Error: visit root_path
|
26
|
+
VCR::Errors::UnhandledHTTPRequestError:
|
17
27
|
|
28
|
+
An HTTP request has been made that VCR does not know how to handle:
|
18
|
-
|
29
|
+
GET https://chromedriver.storage.googleapis.com/LATEST_RELEASE_81.0.4044
|
19
|
-
undefined method `driven_by' for #<RSpec::ExampleGroups::Projects_2:0x0000000006ddc9c0>
|
20
|
-
undefined method `driven_by' for #<RSpec::ExampleGroups::Projects_2:0x0000000006de16f0>
|
21
|
-
undefined method `driven_by' for #<RSpec::ExampleGroups::SignIn:0x0000000006de5ed0>
|
22
|
-
undefined method `driven_by' for #<RSpec::ExampleGroups::SignUps:0x0000000006dea390>
|
23
|
-
undefined method `driven_by' for #<RSpec::ExampleGroups::Tasks:0x0000000006dee198>
|
24
30
|
|
25
|
-
rspec ./spec/system/notes_spec.rb:11 # Notes user uploads an attachment
|
26
|
-
|
31
|
+
There is currently no cassette in use. There are a few ways
|
32
|
+
you can configure VCR to handle this request:
|
33
|
+
|
34
|
+
* If you're surprised VCR is raising this error
|
35
|
+
and want insight about how VCR attempted to handle the request,
|
27
|
-
|
36
|
+
you can use the debug_logger configuration option to log more details [1].
|
37
|
+
* If you want VCR to record this request and play it back during future test
|
28
|
-
|
38
|
+
runs, you should wrap your test (or this portion of your test) in a
|
39
|
+
`VCR.use_cassette` block [2].
|
40
|
+
* If you only want VCR to handle requests made while a cassette is in use,
|
41
|
+
configure `allow_http_connections_when_no_cassette = true`. VCR will
|
42
|
+
ignore this request since it is made when there is no cassette [3].
|
43
|
+
* If you want VCR to ignore this request (and others like it), you can
|
44
|
+
set an `ignore_request` callback [4].
|
45
|
+
|
46
|
+
[1] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/configuration/debug-logging
|
29
|
-
|
47
|
+
[2] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/getting-started
|
48
|
+
[3] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/configuration/allow-http-connections-when-no-cassette
|
49
|
+
[4] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/configuration/ignore-request
|
50
|
+
|
30
|
-
|
51
|
+
1.2) Failure/Error: raise VCR::Errors::UnhandledHTTPRequestError.new(vcr_request)
|
52
|
+
VCR::Errors::UnhandledHTTPRequestError:
|
53
|
+
|
54
|
+
以下省略(上記と同じエラー)
|
31
55
|
```
|