ddnexus / flex

The ultimate ruby client for elasticsearch.
http://ddnexus.github.io/flex/doc/
72 stars 15 forks source link

Undefined method 'each' for string when using FlexSearch. #20

Open therealjasonkenney opened 10 years ago

therealjasonkenney commented 10 years ago

This error suggests flex does not support ruby 1.9, is this true?

I'm using Rails 4 and Ruby 2.0

(Ruby 1.8 allows each on a string, where 1.9 you must use each_line).

ddnexus commented 10 years ago

Flex doesn't use each on any string, only on array and hashes, at least not intentionally. I have personally used it at least on a few dozen of servers with ruby 1.9.

The error suggests me that some string may get passed in place of an array/hash in your code.

Please, could you post a full backtrace (and eventually the code and variables that you are passing)? Thanks.