You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I was trying to find out why rake db:migrate wouldn't create any new tables even though I had the yaml config file specified correctly.
I found out you are trying to evaluate the model name (e.g. Article) in the load_from_yaml method during rails initialization and if something fails you rescue it with nil. The problem is you might have e.g. some acts_as_* statements in the affected model that hasn't been met yet. E.g. you utilize an acts_as_train plugin in the model but the plugin hasn't been loaded so in the "klass = eval(klass) rescue nil" statement you get an undefined method 'acts_as_train' error which results in nil.
If I install acts_as_archived as plugin and set the plugin load order to [:all, :acts_as_archived], it starts working.
The text was updated successfully, but these errors were encountered:
Hello,
I was trying to find out why rake db:migrate wouldn't create any new tables even though I had the yaml config file specified correctly.
I found out you are trying to evaluate the model name (e.g. Article) in the load_from_yaml method during rails initialization and if something fails you rescue it with nil. The problem is you might have e.g. some acts_as_* statements in the affected model that hasn't been met yet. E.g. you utilize an acts_as_train plugin in the model but the plugin hasn't been loaded so in the "klass = eval(klass) rescue nil" statement you get an undefined method 'acts_as_train' error which results in nil.
If I install acts_as_archived as plugin and set the plugin load order to [:all, :acts_as_archived], it starts working.
The text was updated successfully, but these errors were encountered: