jekyll / classifier-reborn

A general classifier module to allow Bayesian and other types of classifications. A fork of cardmagic/classifier.
https://jekyll.github.io/classifier-reborn/
GNU Lesser General Public License v2.1
548 stars 109 forks source link

Backends not loading #160

Closed m13t closed 6 years ago

m13t commented 7 years ago

Hi,

I am trying to use this in a project but am unable to load the Redis Backend. I am currently using Ruby 2.3.4 and attempted to load the Redis backend in a plain IRB session.

The following output is displayed.

irb(main):001:0> require 'classifier-reborn'
=> true
irb(main):002:0> ClassifierReborn::Bayes
=> ClassifierReborn::Bayes
irb(main):003:0> ClassifierReborn::BayesRedisBackend
NameError: uninitialized constant ClassifierReborn::BayesRedisBackend
    from (irb):3
    from /Users/lambertl/.rbenv/versions/2.3.4/bin/irb:11:in `<main>'
irb(main):004:0> ClassifierReborn::BayesMemoryBackend
NameError: uninitialized constant ClassifierReborn::BayesMemoryBackend
    from (irb):4
    from /Users/lambertl/.rbenv/versions/2.3.4/bin/irb:11:in `<main>'

It seems that the require_relative is not actually making the classes accessible outside of the Bayes class itself, as it is able to load the memory store without issue. Has anyone else come across this problem?

Lewis

pskarlas commented 7 years ago

Check out https://github.com/jekyll/classifier-reborn/issues/109 for the solution.

tra38 commented 7 years ago

URL is broken. Try this one.

pskarlas commented 7 years ago

Thanks @tra38

Ch4s3 commented 7 years ago

@pskarlas sorry for the confusion. I need to do a new release, but I need to make sure we aren't going to break Jekyll first, and I'm a bit busy lately. I'll try to get to it soon.

Ch4s3 commented 6 years ago

Bump. Trying to get this out soon, closing the issue but I'll release a new version ASAP/