简体   繁体   中英

"ruby/3.0.1 isn't supported by this pry-doc version" error in Mac => Ruby => Pry

Screenshot of error

How do you solve the following error in Pry in the Mac terminal?

ruby/3.0.1 isn't supported by this pry-doc version

You get this error when you require pry-doc inside of Pry, in order to access Ruby documentation. This happens on today's date, having the latest versions of Ruby, Pry, and Pry-doc.

One solution is to downgrade to the previous version of Ruby, which is 2.7.3, and then reinstall pry and pry-doc.

To do this, enter the following command lines in you terminal in order:

rbenv install 2.7.3

rbenv global 2.7.3

rbenv rehash

Then, the terminal command "ruby -v" should return specifying the current version of Ruby.

Continue with:

gem install bundler pry byebug

gem install pry

gem install pry-doc

Once inside pry, entering the "require 'pry-doc'" command should not raise the error pertaining this question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM