[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

problem with date and date/format

pere.noel

3/10/2006 6:19:00 PM

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 ???
--
une bévue
3 Answers

Yuu

3/10/2006 6:44:00 PM

0

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

--
Posted via http://www.ruby-....


pere.noel

3/10/2006 6:49:00 PM

0

E. Saynatkari <none@none.net> 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...
--
une bévue

pere.noel

3/12/2006 6:00:00 AM

0

E. Saynatkari <none@none.net> 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.
--
une bévue