This is because Sphinx cannot run on Heroku directly - which is why I created the add-on Flying Sphinx :) http://flying-sphinx.com/docs
Yes, it's not free - each customer needs a decent amount of memory for their Sphinx daemon, so offering free plans is just not viable I'm afraid. -- Pat On 08/03/2013, at 7:38 PM, Sasha Klein wrote: > Ahhh! ONE more question. It was working great, then I got this error when I > pushed to heroku (upon running heroku run rake ts:index -- the page with the > search doesn't load): > > Generating configuration to /app/config/production.sphinx.conf > Connecting to database specified by DATABASE_URL > rake aborted! > Riddle::Configuration::ConfigurationError > /app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.5/lib/riddle/configuration/searchd.rb:24:in > `render' > /app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.5/lib/riddle/configuration.rb:37:in > `render' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/configuration.rb:81:in > `render' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/configuration.rb:87:in > `block in render_to_file' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/configuration.rb:87:in > `open' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/configuration.rb:87:in > `render_to_file' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/rake_interface.rb:4:in > `configure' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/rake_interface.rb:31:in > `index' > /app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.0/lib/thinking_sphinx/tasks.rb:9:in > `block (2 levels) in <top (required)>' > > > On Thu, Mar 7, 2013 at 1:06 PM, Sasha Klein <[email protected]> wrote: > Thanks, Pat! Got it to work! > > > On Thursday, March 7, 2013 2:22:42 AM UTC-8, Pat Allan wrote: > Hi Sasha > No worries about asking questions - especially since I think I can answer > this one :) > > It looks like Sphinx on your machine was compiled without support for > PostgreSQL. How did you install PostgreSQL? And how did you install Sphinx? > If you compiled by hand, Sphinx doesn't automatically add PostgreSQL support > - you need to set it with a flag (it's annoying, because I use PostgreSQL all > the time too). It's mentioned in the UNIX section of the TS docs briefly: > http://pat.github.com/ts/en/installing_sphinx.html > > From your file paths, I'm guessing you're on OS X - if you installed Sphinx > via homebrew, but PostgreSQL from elsewhere (say, Heroku's Postgres.app), > then you may need to provide some flags then as well to make sure homebrew > detects PostgreSQL successfully. > > Cheers > > Pat > > On 07/03/2013, at 6:30 PM, Sasha Klein wrote: > > > Thanks! > > > > Ran into another error once I cleared that one :) > > > > So I moved my index definition and tried running "rake ts:index" again, and > > got this error: > > > > indexing index 'post_core'... > > ERROR: source 'post_core_0': unknown type 'pgsql'; skipping. > > ERROR: index 'post_core': failed to configure some of the sources, will not > > index. > > total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg > > total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg > > > > Looking around, I saw this was possibly fixed by creating a > > config/sphinx.yml file and putting: > > > > development: > > bin_path: '/usr/local/bin' > > develpment: > > bin_path: '/usr/local/bin' > > > > in it. Ran that and it still didn't work. Then tried "rake ts:configure", > > and it ran smoothly but still referred to the same > > config/development.sphinx.conf file, which is now a good deal more full: > > > > indexer > > { > > } > > > > searchd > > { > > listen = 127.0.0.1:9306:mysql41 > > log = > > /Users/<personal>/rails_projects/<personal>/log/development.searchd.log > > query_log = > > /Users/<personal>/rails_projects/<personal>/log/development.searchd.query.log > > pid_file = > > /Users/<personal>/rails_projects/<personal>/log/development.sphinx.pid > > workers = threads > > binlog_path = > > /Users/<personal>/rails_projects/<personal>/tmp/binlog/development > > } > > > > source post_core_0 > > { > > type = pgsql > > sql_host = localhost > > sql_user = <personal> > > sql_pass = > > sql_db = <personal>_development > > sql_query = SELECT "posts"."id" * 1 + 0 AS "id", 'Post' AS > > "sphinx_internal_class_name", "posts"."name" AS "name", "posts"."content" > > AS "content", "posts"."id" AS "sphinx_internal_id", 'Post' AS > > "sphinx_internal_class", 0 AS "sphinx_deleted" FROM "posts" WHERE > > ("posts"."id" >= $start AND "posts"."id" <= $end) GROUP BY "posts"."id", > > "posts"."name", "posts"."content", "posts"."id" > > sql_query_range = SELECT COALESCE(MIN("posts"."id"), 1), > > COALESCE(MAX("posts"."id"), 1) FROM "posts" > > sql_attr_uint = sphinx_internal_id > > sql_attr_uint = sphinx_deleted > > sql_attr_string = sphinx_internal_class > > sql_query_info = SELECT "posts".* FROM "posts" WHERE ("posts"."id" = > > ($id - 0) / 1) > > } > > > > index post_core > > { > > path = > > /Users/<personal>/rails_projects/<personal>/db/sphinx/development/post_core > > docinfo = extern > > charset_type = utf-8 > > source = post_core_0 > > } > > > > Any ideas what's happening now? Thanks, and sorry for all the questions. > > > > On Wednesday, March 6, 2013 12:04:17 AM UTC-8, Pat Allan wrote: > > Hi Sasha > > The issue is that Thinking Sphinx's documentation is mostly for v2, but v3 > > is what you're using (and much better). Index definitions are now located > > in app/indices - the README is your best source of information (but > > anything it doesn't cover is probably the same as earlier versions): > > https://github.com/pat/thinking-sphinx/blob/master/README.textile > > > > Have a read through of that, move your index definition, and you should be > > good to go. Any further issues, get in touch :) > > > > -- > > Pat > > > > On 06/03/2013, at 6:12 PM, Sasha Klein wrote: > > > > > Hi, > > > > > > Just installed Thinking Sphinx for my Rails app and have run into the > > > above error. Opened a Stack Overflow post about it, but it doesn't seem > > > to be getting many views/answers. I'll leave the bulk of my code there, > > > where I think it's easier to comb through, but just reiterate the basic > > > problem here. > > > > > > I installed TS and MySQL (already runny development and production on > > > postgresql), then defined indexes for my post model, and went to run > > > "rake ts:index" per the instructions on this Railscast, but I got the > > > error in the subject line. > > > > > > I searched for solutions and ran into this other similar post, but it > > > seems like we have different root causes, as the result of running > > > "Post.sphinx_indexes.length" in the console shows. At any rate, all of > > > this code and some more background is visible in the SO post. > > > > > > Any ideas what's going on? If you'd rather I post the code here, I can do > > > that as well. Just felt redundant. > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Thinking Sphinx" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to [email protected]. > > > To post to this group, send email to [email protected]. > > > Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Thinking Sphinx" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > > > > > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Thinking Sphinx" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/thinking-sphinx/BTgd3_cGF-0/unsubscribe?hl=en. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
