#445 √ resolved
Martin Gamsjaeger

config/init.rb template should use English::Inflect instead of Language::English::Inflector

Reported by Martin Gamsjaeger | August 17th, 2008 @ 05:24 AM | in 0.9.7

The (commented) usage examples for custom inflection rules should use:


English::Inflect

instead of


Language::English::Inflector

On a related note, I filed a bug on the english gem's rubyforge page at http://rubyforge.org/tracker/?at... to support inflections for words like "address" and "princess" out of the box.

Comments and changes to this ticket

  • Michael Klishin (antares)

    Michael Klishin (antares) August 20th, 2008 @ 12:20 PM

    • → State changed from “new” to “invalid”
    • → Assigned user changed from “” to “Michael Klishin (antares)”

    Merb extends English gem and Merb extension lives in Language::English::Inflector. What's wrong with using it as advertised in generated init file?

    It's gonna be merged into extlib eventually, and if you have any patches to English gem, let me know.

  • Martin Gamsjaeger

    Martin Gamsjaeger August 20th, 2008 @ 02:45 PM

    Michael,

    Sorry, I should have been more clear about the why. The thing is, when using Language::English::Inflector, I (and also at least one other person on datamapper irc channel if I remember correctly) got the following error. (This was a few days ago, and also happens with edge from right now)

    .../config/init.rb:157: uninitialized constant Language::English::Inflector (NameError)

        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core/bootloader.rb:316:in `load'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core/bootloader.rb:316:in `load_initfile'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core/bootloader.rb:259:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core/bootloader.rb:68:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core/server.rb:51:in `start'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/lib/merb-core.rb:91:in `start'
        from /usr/local/lib/ruby/gems/1.8/gems/merb-core-0.9.5/bin/merb:12
        from /usr/local/bin/merb:19:in `load'
        from /usr/local/bin/merb:19
    

    Any ideas?

  • Michael Klishin (antares)

    Michael Klishin (antares) August 20th, 2008 @ 03:13 PM

    • → State changed from “invalid” to “open”

    I'll look into it. I tried merb -i and it works :\ Load order problem.

  • Michael Klishin (antares)

    Michael Klishin (antares) September 4th, 2008 @ 04:44 PM

    • → Milestone changed from “” to “0.9.7”
  • Fabien Franzen (loob2)

    Fabien Franzen (loob2) September 5th, 2008 @ 06:15 PM

    • → State changed from “open” to “resolved”
  • Nicholas Faiz

    Nicholas Faiz September 6th, 2008 @ 07:10 AM

    It doesn't seem that this was fixed.

    I'm finding this problem on 434bb664f6007fbf5b07b42c250f345162840eeb .

    Namely, as above, it has to be:

    English::Inflect.word "erratum", "errata"

  • Fabien Franzen (loob2)

    Fabien Franzen (loob2) September 6th, 2008 @ 12:55 PM

    @Nicholas We can't reproduce this issue on db2758f6e4723e3b73fcf9a251da48e935bb22c1 - be sure to have the latest English gem and Extlib HEAD versions too. We currently have a spec for this, and testing with merb -i shows the expected result.

    If the problem persists, could you please supply a sample app that we can try?

  • Fabien Franzen (loob2)

    Fabien Franzen (loob2) September 6th, 2008 @ 01:38 PM

    @Nicholas - config/init.rb of your current app shows incorrect examples of English::Inflect - this is fixed for any new app you create, as well as for apps where you'd regenerate your config/init.rb using merb-gen.

    Through our IRC encounter you made it clear that it's best to ignore you from now on :-/ Thanks.

  • Nicholas Faiz

    Nicholas Faiz September 6th, 2008 @ 01:43 PM

    Ok. I don't want to be argumentative but I will point out two things.

    In this ticket you said that you couldn't reproduce the problem - this implied that English::Inflector was working correctly.

    I contacted you on irc, explained everything which was in this ticket again in private message including posting code examples. I felt it was a very simple problem and it was taking a long to point out. I'm sorry if I didn't want to hang around and keep talking about it but it was becoming a little bit painful.

    Anyway, thanks for showing that the documentation was updated.

  • Fabien Franzen (loob2)

    Fabien Franzen (loob2) September 6th, 2008 @ 01:56 PM

    @Nicholas - I suggest you review the original title of this ticket:

    config/init.rb template should use English::Inflect instead of Language::English::Inflector

    The merb-gen template was promptly fixed in merb-more/merb-gen/lib/generators/templates/application/merb/config/init.rb - then I set the ticket to resolved.

    Now, off coarse your app won't show the changed config/init.rb template code... your comment wasn't clear about whether you meant that the specific case of 'erratum' was faulty, or something else wasn't working. While you should have said: the documentation/comments in config/init.rb are incorrect.

    Can you see why it was painful to grasp your intentions?

  • Nicholas Faiz

    Nicholas Faiz September 6th, 2008 @ 02:06 PM

    Fabien,

    I can't see that, from my point of view I was frustrated and wanted to leave the chat because it was taking a long time to explain a very simple problem. But I'm happy to concede that it was a misunderstanding.

    I will point out that I was at no time rude in chat to you. If I had sworn or been abusive, I'd understand your attitude. It's tiresome to go on about this issue, so I won't. I did feel that I was entitled to reply to your aspersion above, which I've done. I'm happy to put it aside and go back to my code now.

    Regards, biv

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »