# Problem with date and date/format

**URL:** <https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581>\
**Category:** Ruby\
**Created:** [March 10, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581 "2006-03-10T19:26:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 10, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581/1 "2006-03-10T19:26:48Z")

</div>

i’ve a RubyCocoa app, working well on my computer, but this app crashed  
on another one the error message being :

/Applications/BookmarksMerge.app/Contents/Resources/ThirdParty/date/  
format.rb:6: Date is not a class (TypeError)  
from  
/Applications/BookmarksMerge.app/Contents/Resources/ThirdParty/  
date.rb:197  
from  
/Applications/BookmarksMerge.app/Contents/Resources/rb\_main.rb:43

the line 43 in my rb\_main.rb being :

require ‘date’

line 6 of format.rb being simply :

class Date

and line 197 of date.rb :

require ‘date/format’

how this could work on one computer and not on another ???

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 10, 2006, 7:43pm UTC](https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581/2 "2006-03-10T19:43:59Z")

</div>

unknown wrote:

> i’ve a RubyCocoa app, working well on my computer, but this app crashed  
> on another one the error message being :
> 
> /Applications/BookmarksMerge.app/Contents/Resources/ThirdParty/date/  
> format.rb:6: Date is not a class (TypeError)  
> from  
> /Applications/BookmarksMerge.app/Contents/Resources/ThirdParty/  
> date.rb:197  
> from  
> /Applications/BookmarksMerge.app/Contents/Resources/rb\_main.rb:43
> 
> the line 43 in my rb\_main.rb being :
> 
> require ‘date’
> 
> line 6 of format.rb being simply :
> 
> class Date
> 
> and line 197 of date.rb :
> 
> require ‘date/format’
> 
> how this could work on one computer and not on another ???

That error message would be caused by something like this:

module Date  
end

class Date  
end

However, Date being a standard class and hence loaded at startup,  
I am not quite sure how this would occur. Perhaps grep for another  
definition?

E

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 10, 2006, 7:54pm UTC](https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581/3 "2006-03-10T19:54:30Z")

</div>

E. Saynatkari [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> However, Date being a standard class and hence loaded at startup,  
> I am not quite sure how this would occur. Perhaps grep for another  
> definition?

may be that’s the LOAD\_PATH being too large, finding another class Date  
?

or date being included elsewhere on my back ? 😉

for sure i’ll grep…

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 12, 2006, 7:05am UTC](https://www.ruby-forum.com/t/problem-with-date-and-date-format/79581/4 "2006-03-12T07:05:34Z")

</div>

E. Saynatkari [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> However, Date being a standard class and hence loaded at startup,  
> I am not quite sure how this would occur. Perhaps grep for another  
> definition?

yes they are two definitions of class Date one in date.rb at line 392  
the other in date/format.rb at line 6.

what i don’t understand is that this (prob) doesn’t cause a crash on mu  
machine only on a user machine ???

i’m not using directly date, it is called by yaml.
