On Dec 2, 5:59 am, hei <[EMAIL PROTECTED]> wrote:
> Can anyone help me ~~
>
What's the run method in translater? ALso it looks like this isn't the
exact code that is running - for example include "RMMSeg" is almost
certainly include RMMSeg; it's very hard to say anything about code
when it has been changed in small ways in between what you're running
and this mailing list - those changes could be key or could be hiding
the real problem.
Fred
> On 12月2日, 下午12时04分, hei <[EMAIL PROTECTED]> wrote:
>
> > I do things below:
>
> > In lib/translater.rb
> > class Translater
> > require "rubygems"
> > require "rmmseg"
> > include "RMMSeg"
> > ...
> > def segment(text)
> > RMMSeg::segment(text)
> > end
> > end
>
> > in helper/xx/xxx.rb
> > module xx
> > require "translater.rb"
> > def translate(text)
> > Translater.run(text)
> > end
> > end
>
> > when i use helper method tranlate, erros:
> > undefined method `segment' for RMMSeg:Module
> > But when I test these in a simple ruby program it works well
> > Can anyone help me ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---