NameError: uninitialized constant Pry::Command::ExitAll

hello good morning. can anyone please tell me, why this error is throwing?

NameError: uninitialized constant Pry::Command::ExitAll
/home/myname/Downloads/kw/config/application.rb:4:in `require'
/home/myname/Downloads/kw/config/application.rb:4:in `<top (required)>'
/home/myname/Downloads/kw/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

i am trying an old rails app built with rails 4.2 and when i am running rake db:setup it is showing the error.

did you checked this rails console throws "uninitialized constant Pry::Prompt (NameError)" · Issue #93 · rweng/pry-rails · GitHub