This project is archived and is in readonly mode.
script generate does not find generators in symlinked plugins
Reported by phedders | June 18th, 2008 @ 10:05 PM
If I have a plugin symlinked - ie vendor/plugins/ is a symlink, then script/generate does not find the generators.
If vendor/plugins is a link... no problem.
No idea where to start to fix this bug, sorry.
Comments and changes to this ticket
-
phedders June 18th, 2008 @ 10:08 PM
- Title changed from script generator does not find generators in symlinked plugins to script generate does not find generators in symlinked plugins
-
phedders June 20th, 2008 @ 04:00 PM
Just in case Tom forgets... he's fixed this bug though a hack in the hobo plugin, but it really should be fixed upstream. His fix is in:
git://github.com/tablatom/hobo
commit 5d04b0b4e4413f9c2d3b352f34463022ae8be1d0
That will not apply cleanly to rails since it is in the hobo plugin, but will show the logic of the fix.
Oh heck - here it is:
+# 'orrible 'ack so that generators are found in symlinked plugins
+if caller.grep %r(script/generate:\d+$)
- require "rails_generator"
- Rails.configuration.plugin_paths.each do |path|
- relative_path = Pathname.new(File.expand_path(path)).relative_path_from(Pathname.new(::RAILS_ROOT))
- sources = Rails::Generator::Base.sources
- sources << Rails::Generator::PathSource.new(:"plugins (#{relative_path})", "#{path}/*/**/{,rails_}generators")
- end
+end
--
Cheers
Paul
-
Daniel Guettler June 23rd, 2008 @ 04:16 PM
This was originally fixed in commit aa7859c9 see "here": http://github.com/rails/rails/co.... Attached is a patch which brings this change back in the rails_generator/lookup.rb file
-
Daniel Guettler June 23rd, 2008 @ 04:18 PM
here the patch again, can't see it from the first commit...
-
Repository July 12th, 2008 @ 05:59 PM
- State changed from new to resolved
- Tag set to 2.1, 2.1.0, generate, patch, plugins
(from [f90eb81c65d5841b591caf0f5e39ef774d02d06e]) Ensure script/generate finds generators from symlinked plugins. [#449 state:resolved]
Signed-off-by: Pratik Naik
-
Repository August 25th, 2008 @ 09:27 AM
(from [84ceff6921a0619de049301a1b8600b51a7e56f8]) Ensure script/generate finds generators from symlinked plugins. [#449 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 449 script generate does not find generators in symlinked plugins (from [84ceff6921a0619de049301a1b8600b51a7e56f8]) Ensure ...