Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Rails app: NoMemoryError: Too deeply nested

オープン
#204 コメント 3 件 リアクション 9 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rails, ruby
領域
backend

調査の方向性

まず、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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coinbase/temporal-ruby のほかの issue

coinbase/temporal-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。