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

Possible issue with loading from yaml file #28

Open
foresth opened this issue Apr 5, 2011 · 0 comments
Open

Possible issue with loading from yaml file #28

foresth opened this issue Apr 5, 2011 · 0 comments

Comments

@foresth
Copy link

foresth commented Apr 5, 2011

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant