I’m using a natural language parser in one of my development branches of my Cream of the Crop app, to make a user typing something like I want to have a show “next Tuesday” mean something in my actual data. I’m using a gem called Tickle which relies on another called Chronic. Every time I boot up my app, I get these warning messages:
15:24:24 web.1 | * Environment: development
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/tickle-1.0.2/lib/numerizer/numerizer.rb:5: warning: already initialized constant Numerizer::DIRECT_NUMS
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/chronic-0.2.3/lib/numerizer/numerizer.rb:5: warning: previous definition of DIRECT_NUMS was here
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/tickle-1.0.2/lib/numerizer/numerizer.rb:30: warning: already initialized constant Numerizer::TEN_PREFIXES
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/chronic-0.2.3/lib/numerizer/numerizer.rb:30: warning: previous definition of TEN_PREFIXES was here
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/tickle-1.0.2/lib/numerizer/numerizer.rb:40: warning: already initialized constant Numerizer::BIG_PREFIXES
15:24:38 web.1 | /usr/local/lib/ruby/gems/2.2.0/gems/chronic-0.2.3/lib/numerizer/numerizer.rb:40: warning: previous definition of BIG_PREFIXES was here
They are just warnings, and they don’t actually interfere with the running of my app, even when i am using the parser functions (calling Tickle.parse), but those warnings still bug me. It’s enough to make you wonder how much effort it would be to just go into the gems and fix whatever the conflict is. Maybe submit a Pull Request. The problem seems to be trivial, but once you start mucking around in somebody else’s gem there are all kinds of potential unintended consequences, not to mention that I would have to make sure it passed their testing suite before I submitted the request.
For now, though it’s probably a higher priority to actually write the code that uses the gem before I start worrying about the error message produced by it. Add that to the list of tinker projects.