{"action":"created","issue":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/1007","repository_url":"https://api.github.com/repos/pat/thinking-sphinx","labels_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/1007/labels{/name}","comments_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/1007/comments","events_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/1007/events","html_url":"https://github.com/pat/thinking-sphinx/issues/1007","id":172204327,"number":1007,"title":"Sinatra setup issues","user":{"login":"sbayona","id":19575234,"avatar_url":"https://avatars.githubusercontent.com/u/19575234?v=3","gravatar_id":"","url":"https://api.github.com/users/sbayona","html_url":"https://github.com/sbayona","followers_url":"https://api.github.com/users/sbayona/followers","following_url":"https://api.github.com/users/sbayona/following{/other_user}","gists_url":"https://api.github.com/users/sbayona/gists{/gist_id}","starred_url":"https://api.github.com/users/sbayona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbayona/subscriptions","organizations_url":"https://api.github.com/users/sbayona/orgs","repos_url":"https://api.github.com/users/sbayona/repos","events_url":"https://api.github.com/users/sbayona/events{/privacy}","received_events_url":"https://api.github.com/users/sbayona/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-19T19:34:17Z","updated_at":"2016-08-21T02:05:48Z","closed_at":null,"body":"Ruby 2.3.1\r\nSinatra 1.4.7\r\nThinking Sphinx 3.2.0\r\nSphinx 2.2.11\r\n\r\nFile structure:\r\n```\r\n/app\r\n  /indices\r\n    watch_index.rb\r\n  /models\r\n    watch.rb\r\n/config\r\n  production.sphinx.conf\r\n  thinking_sphinx.yml\r\n...\r\n```\r\n\r\nI follow the Sinatra instructions at http://freelancing-gods.com/thinking-sphinx/installing_thinking_sphinx/sinatra.html\r\n\r\nproduction.sphinx.conf: https://gist.github.com/sbayona/3b7b3c03da718c2ca11fa8340a50bd4b\r\nFirst strange thing you'll notice is that it duplicates the index watch_core block.\r\n\r\nthinking_sphinx.yml https://gist.github.com/sbayona/59d509f4edb5dee0d0fb14510d3fb146\r\n\r\nwatch_index.rb https://gist.github.com/sbayona/fd336fe5abdb139f4f4ba7936b2aa999\r\n\r\nWhen I run ``rake ts:regenerate``\r\n\r\n```\r\nGenerating index files for watch_core\r\nrake aborted!\r\nThinkingSphinx::ConnectionError: Error connecting to Sphinx via the MySQL protocol. Error connecting to Sphinx via the MySQL protocol. Can't connect to MySQL server on '127.0.0.1' (61) - REPLACE INTO watch_core (id, `sphinx_internal_class_name`, `name`, `reference`, ....\r\n```\r\n\r\nKeep in mind the data is on a Postgres DB."},"comment":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/comments/241234587","html_url":"https://github.com/pat/thinking-sphinx/issues/1007#issuecomment-241234587","issue_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/1007","id":241234587,"user":{"login":"pat","id":4183,"avatar_url":"https://avatars.githubusercontent.com/u/4183?v=3","gravatar_id":"","url":"https://api.github.com/users/pat","html_url":"https://github.com/pat","followers_url":"https://api.github.com/users/pat/followers","following_url":"https://api.github.com/users/pat/following{/other_user}","gists_url":"https://api.github.com/users/pat/gists{/gist_id}","starred_url":"https://api.github.com/users/pat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pat/subscriptions","organizations_url":"https://api.github.com/users/pat/orgs","repos_url":"https://api.github.com/users/pat/repos","events_url":"https://api.github.com/users/pat/events{/privacy}","received_events_url":"https://api.github.com/users/pat/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T02:05:48Z","updated_at":"2016-08-21T02:05:48Z","body":"Hi Sergio\r\n\r\nThe Sphinx server uses the MySQL protocol - so, while you're using PostgreSQL, Thinking Sphinx is connecting to Sphinx using the mysql2 gem. The error has nothing to do with your MySQL database. Also, `rake ts:index` isn't useful when you're using real-time indices. However, the fact that Sphinx doesn't like the generated configuration file explains why TS cannot connect to Sphinx - it wasn't able to start the daemon.\r\n\r\nThe duplication of the index definition is certainly odd, though! All the code you've shared looks right to me.\r\n\r\nDo you have any code that interacts with Thinking Sphinx while your app boots up? If so, could you share that? Otherwise, I'll try to put together a test app to see if I can reproduce the issue."}}
{"actor":{"display_login":"pat"}}