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

Issue with pry rails prompt #118

Closed
matthutchinson opened this issue Mar 25, 2020 · 3 comments · Fixed by #119
Closed

Issue with pry rails prompt #118

matthutchinson opened this issue Mar 25, 2020 · 3 comments · Fixed by #119

Comments

@matthutchinson
Copy link

matthutchinson commented Mar 25, 2020

I'm seeing:

warning: Pry::Prompt[:rails][:value] is deprecated. Use Pry::Prompt#prompt_procs instead or an instance of Pry::Prompt directly
warning: setting prompt with help of Pry.config.prompt = [proc {}, proc {}] is deprecated. Use Pry::Prompt API instead

  • pry (0.13.0)
  • pry-rails (0.3.9)

My ~/.pryrc

if Pry::Prompt[:rails]
  Pry.config.prompt = Pry::Prompt[:rails][:value]
end

From the pry docs/code its not clear how to resolve this.

@CHTJonas
Copy link
Contributor

CHTJonas commented Apr 9, 2020

According to pry/pry#1877 it should be:

if Pry::Prompt[:rails]
  Pry.config.prompt = Pry::Prompt[:rails]
end

@matthutchinson
Copy link
Author

Thanks for digging that out, its not mentioned in any docs I could find.

@CHTJonas
Copy link
Contributor

Yeah it's surprisingly well hidden. I'll open a PR and see about getting the README here changed.

CHTJonas added a commit to CHTJonas/pry-rails that referenced this issue Apr 10, 2020
Version 0.13.0 of Pry changed the way that prompts are configured and 
added. Specifically, setting the prompt via an array of two procs is now 
deprecated. This commit updates the README documentation so that 
warnings are no longer emitted when running `rails console` at the 
command line and fixes pry#118.

See the Pry CHANGELOG for more information:
https://github.com/pry/pry/blob/master/CHANGELOG.md
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 a pull request may close this issue.

2 participants