|
hi
engine lovers
So I've spent a morning seeing what happens when I take out the engine plugin and try to run rails 2.3 with just the new Rails 'engines' features. It was painful -- and I wouldn't suggest trying it yourself, yet. (James, this is the thing I thought was missing from your "what works/ what doesn't" post (http://rails-engines.org/news/2009/02/02/engines-in-rails-2-3/) -- it doesn't say anything about what we should do now.) Wanted to relay my experiences. === The biggest issue I had was that view paths aren't actually working. Not yet, anyway. They work fine in development but there's some eager loading code that blasts them all away with cache_classes on (in production, basically). There are a couple of patches that fix it, but you'd have to apply them yourself... see this rails ticket: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1712-template-is-missing-error-for-engine-in-production-environment#ticket-1712-5 The second issue I had was that my routes were being blasted away -- it was only using the plugin routes, not my app routes. Still am not sure about that (very funky) problem, but it seems to have something to do with a general route (/:controller/:action/:id.:format ) combined with some map.resources routes. So I guess the lesson is, check your routes before you deploy. There's still the issue of plugin migrations -- because I don't expect to do any code mixing, that's the only thing I still really need from the engines plugin :( Maybe I could use an "engines-lite" plugin that only has the rake tasks? Ah, and the fixtures-combining rake task for tests. In case anyone's interested: A brief checklist, removing your engine plugin and use 2.3 plugin features: 1. remove engine boot line from environment.rb 2. move plugin routes.rb into a /configure/ directory within your plugin, and wrap them in ActionController::Routing::Routes.draw do |map|
3. remove map.from_plugin calls in your app's routes.rb 4. remove engines plugin |
_______________________________________________ Engine-Users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
