#7 new
James Conroy-Finn

can't convert Class into String

Reported by James Conroy-Finn | February 24th, 2009 @ 07:27 PM

After replacing the acts_as_xapian plugin with the latest version from GitHub our Rails environment coughs out type conversion errors.

"can't convert Class into String"

I've linked to the HTML stack trace and a raw full trace below (If you copy the HTML stack track in to TextMate and live preview it hopefully it'll be readable.)

Raw Full Stack Trace | HTML Stack Trace

Our models contain…


acts_as_xapian :texts => [..], :terms => [..]

as per the GitHub documentation. The acts_as_xapian declarations haven't changed and worked previously.

Is this something anyone else is experiencing? I've tried a spot of troubleshooting but I feel I've hit a brick wall on this one.

Many thanks, James

Comments and changes to this ticket

  • James Conroy-Finn

    James Conroy-Finn February 25th, 2009 @ 02:52 PM

    (in response to an email from Lukas asking for more information)

    In user.rb:

    
      acts_as_xapian :texts => [ :email, :name ],
                     :terms => [[:name, 'N', "name"], [:email, 'E', "email"]]
    

    In advisor.rb:

    
      acts_as_xapian :texts => [ :all_emails, :name, :first_name, :last_name, :email_pattern, :program],
                     :terms => [[:name, 'N', "name"],
                                [:all_emails, 'A', "all_emails"],
                                [:first_name, 'F', "first_name"],
                                [:last_name, 'L', "last_name"],
                                [:email_pattern, 'P', 'email_pattern'],
                                [:program, 'U', 'program'],
                                [:state, 'S', 'state']]
    

    We aren't calling a Xapian search; the error occurs when executing acts_as_xapian. The line number is always the last line of the terms assignment (i.e. [:state, ...]].)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

Create new ticket

Create your profile

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

Xapian full text search plugin for Ruby on Rails.

People watching this ticket

Pages