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

pry --plugins causes Pry to crash #2172

Closed
thomaswuensche opened this issue Jan 18, 2021 · 2 comments
Closed

pry --plugins causes Pry to crash #2172

thomaswuensche opened this issue Jan 18, 2021 · 2 comments
Assignees
Labels

Comments

@thomaswuensche
Copy link

Since PR #2119 removed autoloading of plugins, the method Pry.locate_plugins was also removed.
The command pry --plugins still uses this method, which causes Pry to crash.

Stacktrace:

$ pry --plugins
Installed Plugins:
--
Traceback (most recent call last):
	11: from /Users/thomas/.rbenv/versions/2.7.2/bin/pry:23:in `<main>'
	10: from /Users/thomas/.rbenv/versions/2.7.2/bin/pry:23:in `load'
	 9: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/bin/pry:12:in `<top (required)>'
	 8: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/cli.rb:68:in `parse_options'
	 7: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:69:in `parse!'
	 6: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:229:in `parse!'
	 5: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:229:in `each_with_index'
	 4: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:229:in `each'
	 3: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:232:in `block in parse!'
	 2: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop.rb:503:in `process_item'
	 1: from /Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/slop/option.rb:85:in `call'
/Users/thomas/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pry-0.13.1/lib/pry/cli.rb:169:in `block (2 levels) in <top (required)>': undefined method `locate_plugins' for Pry:Class (NoMethodError)

The question is whether to remove the command altogether or to implement a different way of listing plugins.
(maybe looking for every require in .pryrc?)

@thomaswuensche thomaswuensche changed the title pry --plugins causes pry to crash pry --plugins causes Pry to crash Jan 18, 2021
@kyrylo
Copy link
Member

kyrylo commented Feb 8, 2021

Sorry, I released a new version and forgot about this issue. I would probably remove it altogether. You can achieve the same thing with gem list pry-. No need to keep --plugins. Are you willing to contribute a PR? :)

@kyrylo
Copy link
Member

kyrylo commented Apr 12, 2021

Fixed by #2180

@kyrylo kyrylo closed this as completed Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants