Rails app: NoMemoryError: Too deeply nested
まだ誰も着手していません。
評価
調査の方向性
まず、issue で参照されている OJ_OPTIONS 設定を見つけ、既存のシリアライズテストを確認します。提案された compat mode と use_as_json 設定によって、ネストされた NoMemoryError が再現されるのか、それとも防止されるのかを確認し、その後、関連するテストスイートを実行します。Rails のシリアライズパスがリグレッションなしにエラーを回避できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When using Ruby on Rails I'm running into "NoMemoryError: Too deeply nested." with OJ's serialization within this gem. The suggested solution worked if I edited the OJ 'mode' to 'compat' and added the 'use_as_json' flag as follows:
OJ_OPTIONS = {
mode: :compat,
# use ruby's built-in serialization. If nil, OJ seems to default to ~15 decimal places of precision
float_precision: 0,
use_as_json: true
}.freeze
The fact that no one else runs into this makes me wonder if maybe there is something about Rails specifically that is causing this though haven't tracked it down. If it's possible to modify these OJ options for everyone and tests still pass it could be suggested as a solution.
I'm happy to offer a PR if it would be accepted.
- 主要言語
- Ruby
- スター
- 288
- フォーク
- 113
- 平均マージ
- 10日 15時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coinbase/temporal-ruby のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
coinbase/temporal-ruby#361 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
coinbase/temporal-ruby#341 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
coinbase/temporal-ruby#328 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
coinbase/temporal-ruby#326 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
coinbase/temporal-ruby#324 · コメント 3 件 · リアクション 2 件 ·
coinbase/temporal-ruby の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
googleapis/google-api-ruby-client#28001 · リアクション 5 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100