Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SystemStackError(stack level too deep) caused by recursive method_missing #118

Open
nyshk97 opened this issue Apr 5, 2023 · 0 comments
Open

Comments

@nyshk97
Copy link

nyshk97 commented Apr 5, 2023

I attempted to update my Ruby version from 2.7.7 to 3.0.5, and now I am encountering the following error when running RSpec:

Error Details

The error stack trace is as follows:

/home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/view_context.rb:20:in `view_context_stack': stack level too deep (SystemStackError)
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/view_context.rb:8:in `current'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:12:in `rescue in method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:6:in `method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:14:in `rescue in method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:6:in `method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:14:in `rescue in method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:6:in `method_missing'
	from /home/circleci/repo/vendor/bundle/ruby/3.0.0/gems/active_decorator-1.4.0/lib/active_decorator/helpers.rb:14:in `rescue in method_missing'
	 ... 9349 levels...
	from /home/circleci/.rubygems/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:115:in `with_friendly_errors'
	from /home/circleci/.rubygems/gems/bundler-2.4.10/exe/bundle:33:in `<top (required)>'
	from /home/circleci/.rubygems/bin/bundle:25:in `load'
	from /home/circleci/.rubygems/bin/bundle:25:in `<main>'

From reading the stack trace, it seems that:

  • The current method cannot be executed in lib/active_decorator/view_context.rb
  • The error handling in lib/active_decorator/helpers.rb is looping

I am unsure how to address this issue and would appreciate any guidance.

Environment Information

  • Ruby Version: 3.0.5
  • Rails Version: 6.1.7.3
  • Gem Version: 1.4.0

If anyone has any insights or suggestions, I would greatly appreciate your comments. Thank you in advance.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant