Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Crashes on edge Rails #111

Closed
ghiculescu opened this issue May 10, 2024 · 4 comments
Closed

Crashes on edge Rails #111

ghiculescu opened this issue May 10, 2024 · 4 comments

Comments

@ghiculescu
Copy link
Contributor

Since rails/rails#51760, apps using console1984 won't boot, because this line raises:

require 'rails/console/app'

I think that line is necessary, but I'm not sure how it works. If you comment it out, the test suite fails:

/Users/alex/code/console1984/lib/console1984/freezeable.rb:27:in `included': undefined method `thread_mattr_accessor' for Console1984::InputOutput:Module (NoMethodError)

    base.thread_mattr_accessor :prevent_instance_data_manipulation_after_freezing, default: true
        ^^^^^^^^^^^^^^^^^^^^^^
	from /Users/alex/code/console1984/lib/console1984/input_output.rb:2:in `include'
	from /Users/alex/code/console1984/lib/console1984/input_output.rb:2:in `<module:InputOutput>'
	from /Users/alex/code/console1984/lib/console1984/input_output.rb:1:in `<top (required)>'
	from /Users/alex/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
	from /Users/alex/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
	from /Users/alex/code/console1984/lib/console1984/supervisor.rb:4:in `<class:Supervisor>'
	from /Users/alex/code/console1984/lib/console1984/supervisor.rb:3:in `<top (required)>'
	from /Users/alex/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
	from /Users/alex/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
	from /Users/alex/code/console1984/lib/console1984.rb:43:in `<module:Console1984>'
	from /Users/alex/code/console1984/lib/console1984.rb:40:in `<top (required)>'

@st0012 are you able to advise?

@rosa
Copy link
Member

rosa commented May 21, 2024

Thanks @ghiculescu, and sorry for the delay! I've added #113 while we fix the app to extend the Rails console through Rails::ConsoleMethods. I think this should unblock upgrades to Rails Edge.

@rosa
Copy link
Member

rosa commented May 22, 2024

This one should be fixed now.

@rosa rosa closed this as completed May 22, 2024
@rosa
Copy link
Member

rosa commented May 22, 2024

And improved with #115.

@ghiculescu
Copy link
Contributor Author

Thanks @rosa!

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

No branches or pull requests

2 participants