So after a long LONG, break, i sat down with this the other day and somehow I was able to get sphinx running. Maybe if anyone has this same problem in future you might want to try to delete the sphinx configuration files from your application, re- index and start. Worked for me so.
More specifically, delete - /config/development.sphinx.conf /db/sphinx On Feb 19, 12:25 pm, [email protected] wrote: > Hi, > > I believe cat is not available natively on windows. I think 'type' is > quite close . > > Hth > > -- Thibaut > > Envoyé de mon iPhone > > Le 19 févr. 09 à 06:27, Pat Allan <[email protected]> a > écrit : > > > > > I guess you could test it in Ubuntu as well, but it would be best to > > get this working in Windows as well... > > > Hmm, is 'cat' a relevant command in Windows? (Or is this running via > > Cygwin?) What happens if you manually run 'cat path/to/pid.file' from > > the command line? And then in irb, with the regex on the end of the > > line? > > > -- > > Pat > > > On 18/02/2009, at 8:25 PM, Aninda wrote: > > >> Hi Pat, thanks for your reply. The pid_file very much exists. :). > >> That > >> was the first check that occured to me too. > >> As you had suggested ... I wrote these tests that passed : > > >> class FileExistsTest < Test::Unit::TestCase > >> def test_for_Existing_File > >> assert_equal(true, File.exist?("c:/testfile.txt")) > >> end > > >> def test_for_missing_file > >> assert_equal(false, File.exist?("c:/NoFile.txt")) > >> end > > >> def test_for_sphinx_pid_file > >> assert_equal(true, File.exist?("D:/Projects/Feedback/log/ > >> searchd.development.pid")) > >> end > >> end > > >> Any other suggestions that might work? I have been thinking about > >> setting up Ubuntu in dev ... do you think that would be an idea > >> worth > >> exploring? > > >> On Feb 16, 12:53 pm, Pat Allan <[email protected]> wrote: > >>> Hi Aninda > > >>> That's a curious error - it's failing on the following line: > >>> `cat #{pid_file}`[/\d+/] if File.exists?(pid_file) > > >>> The first part should not be evaluated if the file does not exist > >>> (although it looks like it fails because the file's not there!) > > >>> Can you try running File.exists? with a path that you know exists, > >>> and > >>> again with a path that doesn't exist? I'm wondering if there's > >>> implementation differences on Windows, because I can't think of any > >>> other cause at the moment. > > >>> Cheers > > >>> -- > >>> Pat > > >>> On 14/02/2009, at 3:57 AM, Aninda wrote: > > >>>> Hi, > >>>> I'm new to rails and sphinx. I had gotten sphinx up and running > >>>> with > >>>> my rails application yesterday but today when I tried tostart > >>>> sphinx > >>>> up .. I got an error like so (below). Just an FYI Im running > >>>> rails on > >>>> windows. I'm not sure thats the reason because It wasn't a problem > >>>> yesterday. > > >>>> D:\Projects\Feedback>rake ts:index --trace > >>>> (in D:/Projects/Feedback) > >>>> ** Invoke ts:index (first_time) > >>>> ** Invoke thinking_sphinx:index (first_time) > >>>> ** Invoke thinking_sphinx:app_env (first_time) > >>>> ** Execute thinking_sphinx:app_env > >>>> ** Invoke environment (first_time) > >>>> ** Execute environment > >>>> ** Execute thinking_sphinx:index > >>>> Generating Configuration to D:/Projects/Feedback/config/ > >>>> development.sphinx.conf > >>>> C:/Ruby/bin/rake: No such file or directory - cat D:/Projects/ > >>>> Feedback/ > >>>> log/searchd.development.pid > >>>> rake aborted! > >>>> You have a nil object when you didn't expect it! > >>>> You might have expected an instance of ActiveRecord::Base. > >>>> The error occurred while evaluating nil.[] > >>>> D:/Projects/Feedback/vendor/plugins/thinking-sphinx/lib/ > >>>> thinking_sphinx.rb:142:in `sphinx_pid' > >>>> D:/Projects/Feedback/vendor/plugins/thinking-sphinx/lib/ > >>>> thinking_sphinx.rb:137:in `sphinx_running?' > >>>> D:/Projects/Feedback/vendor/plugins/thinking-sphinx/tasks/../lib/ > >>>> thinking_sphinx/tasks.rb:127:in `sphinx_running?' > >>>> D:/Projects/Feedback/vendor/plugins/thinking-sphinx/tasks/../lib/ > >>>> thinking_sphinx/tasks.rb:68 > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in > >>>> `execute' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in > >>>> `execute' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in > >>>> `invoke_with_call_chain' > >>>> C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in > >>>> `invoke_with_call_chain' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in > >>>> `invoke_prerequisites' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in > >>>> `invoke_prerequisites' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in > >>>> `invoke_with_call_chain' > >>>> C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in > >>>> `invoke_with_call_chain' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in > >>>> `invoke' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in > >>>> `invoke_task' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in > >>>> `top_level' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in > >>>> `each' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in > >>>> `top_level' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in > >>>> `standard_exception_handling' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in > >>>> `top_level' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in > >>>> `standard_exception_handling' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run' > >>>> C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 > >>>> C:/Ruby/bin/rake:19:in `load' > >>>> C:/Ruby/bin/rake:19 > > >>>> the sphinx conf file looks like so: > > >>>> indexer > >>>> { > >>>> } > > >>>> searchd > >>>> { > >>>> address = 127.0.0.1 > >>>> port = 3312 > >>>> log = D:/Projects/Feedback/log/searchd.log > >>>> query_log = D:/Projects/Feedback/log/searchd.query.log > >>>> pid_file = D:/Projects/Feedback/log/searchd.development.pid > >>>> } > > >>>> source address_core_0 > >>>> { > >>>> type = mysql > >>>> sql_host = localhost > >>>> sql_user = root > >>>> sql_pass = > >>>> sql_db =Feedback_dev > >>>> sql_query_pre = SET NAMES utf8 > >>>> sql_query = SELECT `addresses`.`id` * 1 + 0 AS `id` , CAST > >>>> (`addresses`.`street_address` AS CHAR) AS `street_address`, CAST > >>>> (`addresses`.`pincode` AS CHAR) AS `pincode`, `addresses`.`id` AS > >>>> `sphinx_internal_id`, 3270727197 AS `class_crc`, '3270727197' AS > >>>> `subclass_crcs`, 0 AS `sphinx_deleted` FROM addresses WHERE > >>>> `addresses`.`id` >= $start AND `addresses`.`id` <= $end GROUP > >>>> BY > >>>> `addresses`.`id` ORDER BY NULL > >>>> sql_query_range = SELECT IFNULL(MIN(`id`), 1), IFNULL(MAX(`id`), 1) > >>>> FROM `addresses` > >>>> sql_attr_uint = sphinx_internal_id > >>>> sql_attr_uint = class_crc > >>>> sql_attr_uint = sphinx_deleted > >>>> sql_attr_multi = uint subclass_crcs from field > >>>> sql_query_info = SELECT * FROM `addresses` WHERE `id` = (($id - > >>>> 0) / 1) > >>>> } > > >>>> index address_core > >>>> { > >>>> source = address_core_0 > >>>> path = D:/Projects/Feedback/db/sphinx/development/address_core > >>>> morphology = stem_en > >>>> charset_type = utf-8 > >>>> } > > >>>> index address > >>>> { > >>>> type = distributed > >>>> local = address_core > >>>> } > > >>>> I cant figure out whats wrong. Has anyone had this problem? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en -~----------~----~----~----~------~----~------~--~---
