Answer by Nomis for Why is Ruby's Date class automatically loaded but...
Worked for me when first initializing with require 'date'.
View ArticleAnswer by TekuConcept for Why is Ruby's Date class automatically loaded but...
In IRB, include this line: require 'date' then you will be able to use DateTime.irb(main):000:0> DateTime.classNameError: uninitialized constant DateTime from (irb):0 from /path/to/ruby/irb:12:in...
View ArticleAnswer by Kamilski81 for Why is Ruby's Date class automatically loaded but...
Being a little more curious, I tried:$ ruby -e 'puts DateTime.class'-e:1:in `<main>': uninitialized constant Object::DateTime (NameError)[~, kamilski81@mac]$ ruby -e 'puts Date.class'-e:1:in...
View ArticleWhy is Ruby's Date class automatically loaded but DateTime is not?
Using IRB, why are the Date & Time classes automatically loaded, but DateTime is not? I have to require 'date', this does not make sense to me because I thought that both Date and DateTime were...
View Article
More Pages to Explore .....