Closed Otterpocket closed 6 years ago
I am having the same problem. Any known workaround?
I think it has to do with load order. I'll have a look at it.
By the ways. Do you run migrations from project root dir?
@emilslv You run them from the plugin root directory
@Otterpocket Try from project root directory
Quick note: Simply putting a require "spina"
at the top of my engine class seems to be working for me at the moment. I realize this isn't optimal, but could be an okay workaround until a proper fix is released.
I looked into it and believe that adding require "spina"
to the top of your engine.rb
file is actually the way to go. I'm not sure why this was not necessary in the past, but I edited the wiki to reflect this change.
After creating a new engine/plugin if you have rails 5.1.* as a dependency, trying to create a model in the plugin yields the following error:
engine.rb:5:in block in <class:Engine>': uninitialized constant Spina::Plugin (NameError)
To reproduce, follow the creating a plugin guide here and change the version of the rails dependency.