problem with date and date/format

U

Une bévue

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

E. Saynatkari

unknown said:
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
 
U

Une bévue

E. Saynatkari said:
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...
 
U

Une bévue

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top