CyberAula / vish

ViSH, an open source e-Learning platform
http://vishub.org
GNU Affero General Public License v3.0
135 stars 64 forks source link

VISH sphinx failed #118

Closed sridhardubbaka closed 8 years ago

sridhardubbaka commented 8 years ago

Hi,

I am trying to install VISH. I faced below 2 issues:

  1. I am using mysql 5.5.52. MySQL is NOT allowing defaut values for text when creating schema: In schema.rb, while creating mail_lists and contests the defailt value of these text fields are set to {}. MySql is not allowing the default value. I tries to modified the Sql_mode but still it did not allow. So finally I removed the default value and continued the step "bundle exec rake db:schema:load"
  2. After that I have installed sphinxsearch. But the sphinxsearch is failing in configure. below is the error: sridhar@BLR1000009988:~/vish$ bundle exec rake ts:index /home/sridhar/.rvm/gems/ruby-2.3.0/gems/proudhon-0.3.7/lib/proudhon/constants.rb:8: warning: key :replies is duplicated and overwritten on line 24 Generating Configuration to /home/sridhar/vish/config/development.sphinx.conf rake aborted! TypeError: no implicit conversion of nil into String /home/sridhar/.rvm/gems/ruby-2.3.0/gems/arel-3.0.3/lib/arel.rb:40:in initialize' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/arel-3.0.3/lib/arel.rb:40:innew' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/arel-3.0.3/lib/arel.rb:40:in sql' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_helper.rb:47:inblock in sanitize' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_helper.rb:45:in map' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_helper.rb:45:insanitize' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_dependency/join_association.rb:104:in block in join_to' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_dependency/join_association.rb:74:ineach' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_dependency/join_association.rb:74:in each_with_index' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/associations/join_dependency/join_association.rb:74:injoin_to' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation/query_methods.rb:370:in block in build_joins' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation/query_methods.rb:369:ineach' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation/query_methods.rb:369:in build_joins' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation/query_methods.rb:266:inbuild_arel' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation/query_methods.rb:260:in arel' /home/sridhar/.rvm/gems/ruby-2.3.0/bundler/gems/rails-54ebd0aea2e6/activerecord/lib/active_record/relation.rb:459:into_sql' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/source/sql.rb:29:in to_sql' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/source.rb:117:inset_source_sql' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/source.rb:46:in to_riddle_for_core' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/index.rb:115:inblock in to_riddle_for_core' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/index.rb:114:in each' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/index.rb:114:ineach_with_index' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/index.rb:114:in to_riddle_for_core' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/index.rb:84:into_riddle' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/active_record.rb:253:in block in to_riddle' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/active_record.rb:252:incollect' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/active_record.rb:252:in to_riddle' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/configuration.rb:162:inblock in generate' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/configuration.rb:159:in each' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/configuration.rb:159:ingenerate' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/configuration.rb:175:in build' /home/sridhar/.rvm/gems/ruby-2.3.0/gems/thinking-sphinx-2.0.14/lib/thinking_sphinx/tasks.rb:88:inblock (2 levels) in <top (required)>' /home/sridhar/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in eval' /home/sridhar/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
    ' Tasks: TOP => ts:index => thinking_sphinx:index (See full trace by running task with --trace)

Pls help in resolving this issue

sridhardubbaka commented 8 years ago

Note: I am using the code from master branch I am using ruby 2.3.0p0

agordillo commented 8 years ago

Which version of Sphinx are you using? Try Sphinx 2.0.4.

schetkov commented 7 years ago

I have the same problem with both mysql 5.5 and postgresql 9.3.14. Tried sphinx versions 3.2.0 and 2.0.4, no luck.

hermann77 commented 7 years ago

I have the same problem and this is not a Sphinx related problem. The same problem appears on bundle exec rake db:schema:load this is one step before Sphinx installation.

Error on bundle exec rake db:schema:load: ActiveRecord::StatementInvalid: Mysql2::Error: BLOB/TEXT column 'settings' can't have a default value.

I tried to change 'sql-mode' of my MySQL-Server (tried every recommended mode) but no luck.

The right way is may be to change the rake DB-schema configs on VISH. Because it's MySQL related problem and MySQL-server obviously doesn't support default values on BLOB/TEXT columns.