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

Adds support for Rails version >= 7.2 #130

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

melopilosyan
Copy link
Contributor

After upgrading Rails console using IRB's latest official extension APIs pry-rails fails to open the console.

This change takes Rails' console helper methods defined in IRB::HelperMethod.helper_methods and adds them to the main object.


I know this repository is "not actively maintained", but if there's a chance to merge this PR, I'll add tests as well. Let me know.

After upgrading [Rails console using IRB's latest official extension APIs](rails/rails#51705)
pry-rails is failing to open the console.

This change takes Rails' console helper methods defined in
IRB::HelperMethod.helper_methods and adds to the main object.
@jjb
Copy link

jjb commented Jun 5, 2024

@djpowers this may be necessary for rails 7.2 - any chance you could take a look? thanks!

@zealot128
Copy link

For Google/Search, after upgrading to Rails 7.2.beta2 I received this Deprecation on boot:

DEPRECATION WARNING: `rails/console/app` has been deprecated and will be removed in Rails 8.0.
Please require `rails/console/methods` instead.
 (called from <main> at /xx/lib/ruby/gems/3.2.0/gems/railties-7.2.0.beta2/lib/rails/console/app.rb:4)
DEPRECATION WARNING: `rails/console/helpers` has been deprecated and will be removed in Rails 8.0.
Please require `rails/console/methods` instead.
 (called from <main> at /xx/lib/ruby/gems/3.2.0/gems/railties-7.2.0.beta2/lib/rails/console/helpers.rb:3)
Loading development environment (Rails 7.2.0.beta2)

Applying the Gem as Git source worked fine:

gem 'pry-rails', git: 'https://github.com/melopilosyan/pry-rails.git', ref: '88a8f1a'

Hopeful, this gets merged, because I love pry, still more convenient than the (much improved) IRB, IMO :)

@fatkodima
Copy link

Sorry for pinging, @rf- can you please take a look? This prevents many people from upgrading to rails 7.2.

@rf-
Copy link
Member

rf- commented Jun 20, 2024

This seems like it works, thanks! I am noticing a couple of the pry-rails-specific commands are broken (since who knows when), but no reason to block shipping an update with the basic console functionality.

I can release this right now, but obviously I'm not too engaged with Pry stuff at this point. I wonder if @andrehjr might be interested in admin on this repo, since he's been relatively active on the main Pry repo?

@rf- rf- merged commit c7647d2 into pry:master Jun 20, 2024
@rf-
Copy link
Member

rf- commented Jun 20, 2024

OK, 0.3.10 is out now with this fix, thanks again

@rf-
Copy link
Member

rf- commented Jun 20, 2024

OK, I just noticed the two open PRs fixing that bug 😅 I'll release 0.3.11 in a second with that fix

@andrehjr
Copy link
Member

Hi @rf- Yeah, that would be awesome. I can help out here too, if needed 🙌

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

Successfully merging this pull request may close these issues.

6 participants