Problem with date and date/format


#1

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 ???


#2

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


#3

E. Saynatkari 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 ? :wink:

for sure i’ll grep…


#4

E. Saynatkari 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.