You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/ruby/troubleshooting.mdx
+57-51Lines changed: 57 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ You might still need to use the `timeout` program to terminate tests and capture
205
205
:::
206
206
207
207
<details>
208
-
<summary>For legacy versions of `knapsack_pro` older than 7.7.0, please click here.</summary>
208
+
<summary>For legacy versions of `knapsack_pro` older than 7.7.0, click here.</summary>
209
209
210
210
Tests freeze and CI node timeouts (the Ruby process is killed by a CI provider). Add the following script to `spec_helper.rb`. Thanks to that, you will see the backtrace showing what code line causes the hanging problem. Backtrace is visible only if the Ruby process got kill with `USR1` signal. Learn more from this [GitHub issue](https://github.com/rspec/rspec-rails/issues/1353#issuecomment-93173691).
211
211
@@ -324,10 +324,10 @@ WebMock or VCR may trigger the following errors when Knapsack Pro interacts with
**`knapsack_pro` version 7.2 fixed those issues.**
327
+
**Update the `knapsack_pro`gem to the latest version to fix those issues.**
328
328
329
329
<details>
330
-
<summary>For legacy versions of `knapsack_pro` older than 7.2, please click here.</summary>
330
+
<summary>For legacy versions of `knapsack_pro` older than 7.2, click here.</summary>
331
331
332
332
Add the Knapsack Pro API's subdomain to the [ignored hosts](https://benoittgt.github.io/vcr/#/configuration/ignore_request) and [`disable_web_connect!`](https://github.com/bblimke/webmock) in `spec/spec_helper.rb` (or wherever your WebMock/VCR configuration is located):
333
333
@@ -442,69 +442,75 @@ You have a couple of options:
442
442
443
443
## Rake tasks under tests are run more than once in Queue Mode
444
444
445
-
Make sure the Rake task is loaded once for each test example in the spec file:
445
+
**Update the `knapsack_pro` gem to the latest version to fix this issue.**
446
446
447
447
importTabsfrom'@theme/Tabs';
448
448
importTabItemfrom'@theme/TabItem';
449
449
450
-
<Tabs>
451
-
<TabItemvalue="rake">
452
-
453
-
```ruby
454
-
classDummyOutput
455
-
class << self
456
-
attr_accessor:count
457
-
end
458
-
end
459
-
460
-
namespace :dummydo
461
-
task do_something_once::environmentdo
462
-
DummyOutput.count ||=0
463
-
DummyOutput.count +=1
464
-
puts"Count: #{DummyOutput.count}"
465
-
end
466
-
end
467
-
```
468
-
469
-
</TabItem>
470
-
471
-
<TabItemvalue="spec">
450
+
<details>
451
+
<summary>For legacy versions of `knapsack_pro` older than 8.1.1, click here.</summary>
472
452
473
-
```ruby
474
-
require'rake'
453
+
Make sure the Rake task is loaded once for each test example in the spec file:
475
454
476
-
describe 'Dummy rake'do
477
-
describe "dummy:do_something_once"do
478
-
let(:task_name) { "dummy:do_something_once" }
479
-
let(:task) { Rake::Task[task_name] }
455
+
<Tabs>
456
+
<TabItemvalue="rake">
480
457
481
-
before(:each) do# make sure the rake task is defined *once*
0 commit comments