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

Error occurred when rake db:schema:load #95

Closed chenshuchuan closed 9 years ago

chenshuchuan commented 9 years ago

Warning: Error loading /root/vish/app/models/quiz_session.rb: Mysql2::Error: Table 'vish_development.quiz_sessions' doesn't exist: SHOW FULL FIELDS FROM quiz_sessions ... rake aborted! ActiveRecord::StatementInvalid: Mysql2::Error: Table 'vish_development.tags' doesn't exist: SHOW FULL FIELDS FROM tags ... When i run bundle exec rake db:schema:load , Do someone have the same problem?

bertocode commented 9 years ago

We were having the same problem here but, We fixed it doing "bundle exec rake db:schema:load". Do it and let us know if does work.

bertocode commented 9 years ago

Just reproduce this error in another machine I fixed commenting next lines during first migration:

This lines found in config/initializers/catalogue.rb from 59 to 62 if config.catalogue['mode'] == "matchtag" and ActiveRecord::Base.connection.column_exists?(:tags, :plain_name) allActsAsTaggableOnTags = ActsAsTaggableOn::Tag.where("plain_name IN (?)", config.catalogue["category_keywords"][c1].map{|tag| ActsAsTaggableOn::Tag.getPlainName(tag)}) config.catalogue["category_tag_ids"][c1] = allActsAsTaggableOnTags.map{|t| t.id} end

and app/models/quiz_session.rb line 12

acts_as_xlsx

chenshuchuan commented 9 years ago

So I apologize for the late return information,I'm using Ubuntu,When this problem arises, I have deleted the acts_as_xlsx from app/models/quiz_session.rb line 12 and Empty the file config/initializers/catalogue.rb

After I run bundle exec rake db:schema:load again, This can be a successful migration,But on the page relative to the function does not work well

ps: Pardon my English

agordillo commented 9 years ago

This bug has been fixed in https://github.com/ging/vish/commit/ffb5a3df0fc0e665b2f368bc25bb455047eee991.

Two changes have been done:

Thanks for the feedback.