Skip to content
This repository

Possible issue with loading from yaml file #28

Open
foresth opened this Issue · 0 comments

1 participant

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.