Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Ruby 3.0.0 throwing NameError (uninitialized constant Boolean)

Literally, this is showing up in irb and in my application code. Suddenly ruby 3.0.0 is no longer recognizing Boolean

This worked a few weeks ago, it must have appeared after an OS update

$ irb
3.0.0 :001 > String
 => String 
3.0.0 :002 > Boolean
Traceback (most recent call last):
        4: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/bin/irb:23:in `<main>'
        3: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/bin/irb:23:in `load'
        2: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
        1: from (irb):2:in `<main>'
NameError (uninitialized constant Boolean)

env

  • ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]
  • rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
  • MacOS 12.5.1 (2.4 GHz 8-Core Intel Core i9 processor)

Troubleshooting steps already taken:

  • uninstalled and reinstalled using RVM rvm uninstall 3.0.0 then rvm install 3.0.0

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Ruby has never had a Boolean type. The Boolean constants true and false are, respectively, of types TrueClass and FalseClass, and both inherit directly from Object. There is not, and has never been, a type called Boolean in core Ruby.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading