Skip to content

Commit b58d23a

Browse files
committed
docs(predict): troubleshooting
1 parent 0b078c3 commit b58d23a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docusaurus/docs/ruby/predict.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ pagination_next: null
33
pagination_prev: null
44
---
55

6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
69
# PREDICT
710

811
:::caution
@@ -66,3 +69,47 @@ You can expect the following behaviour:
6669
* `Gemfile` or `Gemfile.lock` were modified
6770
* The current commit message contains `[skip predict]` / `[predict skip]`
6871
* The per-test coverage does not exist on the Knapsack Pro API (e.g., just enabled the feature)
72+
73+
## Troubleshooting
74+
75+
### Sidekiq throws a segmentation fault
76+
77+
The latest patch versions of Sidekiq are affected by an [issue](https://github.com/sidekiq/sidekiq/issues/6502) that causes segmentation faults.
78+
79+
On CI, before running your tests you can downgrade to the latest patch that works correctly:
80+
81+
```ruby
82+
bundle config --local deployment false # "Unfreezes" the lock file. May not be necessary.
83+
bundle remove sidekiq && bundle add sidekiq --version=7.3.2
84+
```
85+
86+
### Using with Coverage or SimpleCov
87+
88+
If you are executing `Coverage` or [`SimpleCov`](https://github.com/simplecov-ruby/simplecov) before Knapsack Pro, enable both line and eval coverage:
89+
90+
<Tabs>
91+
<TabItem value="simplecov" label="SimpleCov">
92+
93+
```ruby
94+
require 'simplecov'
95+
SimpleCov.start do
96+
# line coverage is the default
97+
enable_coverage_for_eval
98+
end
99+
100+
require 'knapsack_pro'
101+
# ...
102+
```
103+
104+
</TabItem>
105+
<TabItem value="coverage" label="Coverage">
106+
107+
```ruby
108+
Coverage.start(lines: true, eval: true)
109+
110+
require 'knapsack_pro'
111+
# ...
112+
```
113+
114+
</TabItem>
115+
</Tabs>

0 commit comments

Comments
 (0)