Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred when rake db:schema:load #95

Closed
chenshuchuan opened this issue May 1, 2015 · 4 comments
Closed

Error occurred when rake db:schema:load #95

chenshuchuan opened this issue May 1, 2015 · 4 comments
Labels

Comments

@chenshuchuan
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

This bug has been fixed in ffb5a3d.

Two changes have been done:

Thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants