A few hours ago I factored out one of my AR models that I’d be reusing
into a minimalist plugin. I copied the model into the plugin’s lib/,
added a line to init.rb to load it, and the model was now present in the
The next step was to move the model’s controller and views into the
plugin. Engines seemed like the way to go, since that’s exactly what
it’s for. So I install the Engines plugin per the site’s instructions.
I follow Gwyn’s tutorial step by step: I create an app/ hierarchy at the
top level of my plugin, I empty out my init.rb because that’s what he
does in Macaque. I move my model into the plugin’s app/models. I restart
my console and I get this:
LoadError: Expected ./script/…/config/…/config/…/app/models/geo.rb to
load_missing_constant' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib /active_support/dependencies.rb:452:inconst_missing’
I can get at all my other (non-plugin) classes just fine, but this one?
No dice. Both Engines and my plugin show up in Rails.plugins, and the
output shows that it’s being seen as an engine in that it has model,
controller and view paths. My development log shows the engines plugin
loading first and this and my other plugins loading with engines
I know Engines is broken in Edge, but is it also broken in the current
1.2.3 release? If it isn’t, I’ll be glad to dig deeper and paste in my
plugin’s whole directory and file layout, etc.