Hi Tony,
Am 12.12.2007 um 03:53 schrieb Tony Arcieri:
> Or for that matter...
>
> class ActionController::Routing::RouteSet::Mapper
> def from_plugin(name)
> eval File.read(File.join(RAILS_ROOT, "vendor/plugins/#{name}/
> routes.rb"))
> end
> end
plugins are allowed to be located in arbitrary subdirectories under
vendor/plugins.
So vendor/plugins/this/is/a/valid/plugin is a valid plugin dir, if
there's either an init.rb or a lib subdirectory in it.
>
>
> On Dec 11, 2007 7:45 PM, Tony Arcieri <[EMAIL PROTECTED]> wrote:
> Is there any reason why map.from_plugin needs to be any more complex
> than this:
>
> module ActionController
> module Routing
> class RouteSet
> class Mapper
> def from_plugin(name)
> eval File.read(File.join(RAILS_ROOT, "vendor/plugins/
> #{name}/routes.rb"))
> end
> end
> end
> end
> end
>
> That's certainly working fine for me for the time being...
>
>
> On Dec 11, 2007 2:31 PM, Tony Arcieri <[EMAIL PROTECTED]> wrote:
> I'm trying to map.from_plugin :my_engine in the routes.rb for my
> application
>
> The problem appears to be that at the time routes.rb has been
> processed the Engines plugin itself is loaded but my Engine has not.
>
> On line 69 of lib/engines/rails_extensions/routing.rb:
>
> routes_path = Engines.plugins[name].routes_path
>
> Engines.plugins[name] is returning nil for my engine since it hasn't
> been loaded yet, and it dies trying to call nil.routes_path.
> Perhaps this should raise ArgumentError or something if
> Engines.plugins[name] is nil...
>
> At the time routes.rb is being processed, there's only one entry in
> Engines.plugins:
>
> #<Engines::Plugin:0x1945934 @public_directory=nil,
> @controller_paths=["app/controllers", "components"], @loaded=true,
> @code_paths=["app/controllers", "app/helpers", "app/models",
> "components", "lib"], @name="engines", @directory="/Users/tony/src/
> clickcaster/vendor/plugins/engines">
>
> Is there some way I can explicitly load my engine in environment.rb
> until this problem can be corrected?
>
> --
> Tony Arcieri
> ClickCaster, Inc.
> [EMAIL PROTECTED]
>
>
>
> --
> Tony Arcieri
> ClickCaster, Inc.
> [EMAIL PROTECTED]
>
>
>
> --
> Tony Arcieri
> ClickCaster, Inc.
> [EMAIL PROTECTED] _______________________________________________
> Engine-Developers mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
--
sven fuchs [EMAIL PROTECTED]
artweb design http://www.artweb-design.de
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)
_______________________________________________
Engine-Developers mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org