dejan/rails_panel

Incompatible with Rails 7

scott-knight opened this issue ยท 17 comments

Using Rails 7 and Ruby 3.0.3, created a new Rails 7 full stack app, added meta_request to the Gemfile and ran bundler. Everything install as expected. Then tried to run rails db:create and received the following error:

rails aborted!
SystemStackError: stack level too deep
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:180:in 'initialize_dup'
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:180:in 'dup'
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:180:in 'block in as_json'
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:179:in 'each'
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:179:in 'as_json'
/Users/scottknight/scott.projects/jobsauce-app/.gems/gems/activesupport-7.0.0/lib/active_support/core_ext/object/json.rb:63:in 'as_json'

I commented out all gems in the Gemfile and enabled them one by one, each time running bundler then rails db:create until I received the same error. When meta_request was enabled, the error appeared again. When disabled (or removed), the error goes away. I have no idea why the gem would cause this error, but it is not compatible with Rails 7.

And I can not install it on a new Rails 7 app?!

Bundler could not find compatible versions for gem "railties":
  In snapshot (Gemfile.lock):
    railties (= 7.0.0)

  In Gemfile:
    meta_request (~> 0.7.3) was resolved to 0.7.3, which depends on
      railties (>= 3.0.0, < 7)

    rails (~> 7.0.0) was resolved to 7.0.0, which depends on
      railties (= 7.0.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
cmer commented

If it helps, I was able to get past the stack overflow error like this: rails/rails#44157 (comment)

But then my code crashes later on.

I'm also hitting the same errors w/ Rails 7.0.1.

Please advise.

Also encountering same issues.

same issues

Same issue with ruby 3.1.2p20 and Rails 7.0.3

It works if you set the gem's version to the master branch

@amrdruid thank you very much, as you said it works like this: gem 'meta_request', github: 'dejan/rails_panel', branch: 'master'

@elalemanyo Even better, you can use the version that is published in RubyGems

https://rubygems.org/gems/meta_request

gem 'meta_request', '~> 0.7.4'

@scott-knight If this fixes it for you feel free to close this issue