Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:49:16+00:00 2026-06-18T14:49:16+00:00

I used to use the second version of the software and had no problems.

  • 0

I used to use the second version of the software and had no problems. In my last application, I decided to use the latest “thinking-sphinx”. I have a strange mistake.

> NoMethodError in Adverts#index undefined method `next_result' for
> #<Mysql2::Client:0xac86a54>

My gemfile

    gem 'rails', '3.2.11'
    gem 'pg', '0.14.0'  # My database

# for sphinx
                gem "mysql2", "~> 0.3.11"
                gem "thinking-sphinx", "~> 3.0.0"

Indexes:

ThinkingSphinx::Index.define :car, :with => :active_record do
   has user_id, model_id, city_id, area_id, engine_id, mileage
  end

thinking_sphinx.yml

    development:
      port: 9312
    test:
      port: 9313
    production:
      port: 9312

Controller:

class AdvertsController < ApplicationController
  def index
    @cars = Car.by_model_id(@model_id)
  end
end

Model:

class Car < ActiveRecord::Base
    include ThinkingSphinx::Scopes

    sphinx_scope(:by_model_id) { |id|
      {:with => {:model_id => id}}
    }
end

My view

%ul= render :partial => “item”, :collection => @cars, :as => :item

item

%li=item.id

What’s wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:49:17+00:00Added an answer on June 18, 2026 at 2:49 pm

    I was about to go mad after spending more than 2 hours on this before I read the READ ME document carefully once again (https://github.com/pat/thinking-sphinx) and found out it is the mysql gem version that caused.

    Upgrading to ‘mysql2’, ‘0.3.12b4’ solved the issue….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use a guitar tab site and it had a feature where
I used to use Backbone.js as an easy MVC framework which have build-in routing
We ran into strange sql / linq behaviour today: We used to use a
I had created one application with 2 versions one is paid second free. Now
I created a coffeescript version from the second example here: http://socket.io/#how-to-use In the example
I have a use case where my GWT application is running on a client
I have an SQLite database stored in the assets resources of one application used
I'm currently developing application using WinRT/C#. It is second version, first was developed on
I used to use procedural-style PHP. Later, I used to create some classes. Later,
I used to use SVN 1.4 on OS X Leopard and everything was fine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.