Fix nessary indexes in code and recreate them:
rake db:mongoid:create_indexes RAILS_ENV=production
PS Before this I had to disable the errors when creating long indexes:
# mongo
MongoDB shell version:2.6.12
connecting to: test
> db.getSiblingDB('admin').runCommand({ setParameter:1, failIndexKeyTooLong:false})
Also may be needed reindex:
Also may be needed reindex:
db.getCollectionNames().forEach(function(collection){db[collection].reIndex()});