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 error after update pry-inline to support pry 0.13 #9

Closed
hstastna opened this issue Mar 25, 2020 · 5 comments
Closed

Pry error after update pry-inline to support pry 0.13 #9

hstastna opened this issue Mar 25, 2020 · 5 comments

Comments

@hstastna
Copy link

Error is thrown after it hits binding.pry in the ruby code, for pry-inline 1.0.6 and pry 0.13.0:

...
before_session hook failed: NoMethodError: undefined method `inline' for #<Pry::Config:0x0000000004cf3380>
/home/hstastna/.rbenv/versions/2.5.4/lib/ruby/gems/2.5.0/gems/pry-0.13.0/lib/pry/config.rb:250:in `method_missing'
(see pry_instance.hooks.errors to debug)
...

Backtrace:

[4] pry(#<DashboardController>)> pry_instance.hooks.errors.first.backtrace
=> [
 "gems/pry-0.13.0/lib/pry/config.rb:250:in `method_missing'",
 "gems/pry-inline-1.0.6/lib/pry-inline/code_extension.rb:103:in `min_debug_info_width'",
 "gems/pry-inline-1.0.6/lib/pry-inline/code_extension.rb:39:in `block in print_to_output'",
 "gems/pry-inline-1.0.6/lib/pry-inline/code_extension.rb:34:in `each'",
 "gems/pry-inline-1.0.6/lib/pry-inline/code_extension.rb:34:in `print_to_output'",
 "gems/pry-0.13.0/lib/pry/code.rb:264:in `highlighted'",
 "gems/pry-0.13.0/lib/pry/commands/whereami.rb:108:in `process'",
 "gems/pry-0.13.0/lib/pry/class_command.rb:82:in `call'",
 "gems/pry-0.13.0/lib/pry/command.rb:495:in `call_with_hooks'",
 "gems/pry-0.13.0/lib/pry/command.rb:431:in `block in call_safely'",
 "gems/pry-0.13.0/lib/pry/command.rb:439:in `use_unpatched_symbol'",
 "gems/pry-0.13.0/lib/pry/command.rb:430:in `call_safely'",
 "gems/pry-0.13.0/lib/pry/command.rb:404:in `process_line'",
 "gems/pry-0.13.0/lib/pry/command_set.rb:354:in `process_line'",
 "gems/pry-0.13.0/lib/pry/pry_instance.rb:376:in `run_command'",
 "gems/pry-0.13.0/lib/pry/hooks.rb:20:in `block in default'",
 "gems/pry-0.13.0/lib/pry/hooks.rb:111:in `block in exec_hook'",
 "gems/pry-0.13.0/lib/pry/hooks.rb:109:in `map'",
 "gems/pry-0.13.0/lib/pry/hooks.rb:109:in `exec_hook'",
 "gems/pry-0.13.0/lib/pry/pry_instance.rb:396:in `exec_hook'",
 "gems/pry-0.13.0/lib/pry/repl.rb:48:in `prologue'",
 "gems/pry-0.13.0/lib/pry/repl.rb:37:in `start'",
 "gems/pry-0.13.0/lib/pry/repl.rb:15:in `start'",
 "gems/pry-0.13.0/lib/pry/pry_class.rb:191:in `start'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:117:in `block in resume_pry'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:30:in `block (2 levels) in run'",
 "gems/byebug-11.1.1/lib/byebug/helpers/eval.rb:94:in `allowing_other_threads'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:30:in `block in run'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:29:in `catch'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:29:in `run'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:113:in `resume_pry'",
 "gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:65:in `at_line'",
 "gems/byebug-11.1.1/lib/byebug/context.rb:98:in `at_line'",
 ...
]

When using lower version for pry-inline, error did not occur and everything worked as expected:
gem "pry-inline", "<1.0.6"

@eliotsykes
Copy link

eliotsykes commented Mar 31, 2020

I can confirm seeing this issue with pry 0.13.0 and pry-inline 1.0.6.

To workaround, use pry 0.12.2 and pry-inline 1.0.5.

@seikichi
Copy link
Owner

Hi @hstastna , @eliotsykes

Sorry, I noticed this issue now. Thank you for reporting the issue. I'll check it.

@seikichi
Copy link
Owner

seikichi commented May 6, 2020

Hi @hstastna, @eliotsykes

I fixed the problem and released the new version (1.0.7).

Please use pry-inline 1.0.7 and pry 0.13.1 )!= 0.13.0). It seems that there is a bug in 0.13.0 (pry/pry#2126 ).

@hstastna
Copy link
Author

hstastna commented May 6, 2020

@eliotsykes Does the fix work for you? Can I close the issue?

@eliotsykes
Copy link

Thanks for this @seikichi.

@hstastna Yes, I believe you can close this. These versions are working:

✅ pry-inline 1.0.7 with pry 0.12.2
✅ pry-inline 1.0.7 with pry 0.13.1

@hstastna hstastna closed this as completed May 7, 2020
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

3 participants