Thanks for your help Jamis, I suspect there is a problem with using
Capistrano with JRuby. I was able to successfully deploy but
overriding the namespaces.rb errors for duplicate methods and tasks
(and downgrading net-ssh to a JRuby compatible version).

Hopefully I will get a block of time in the near future to figure out
where the conflicts are and makes some JRuby compatibility extensions.

thanks,
Michael

On Feb 13, 5:50 pm, Jamis Buck <[email protected]> wrote:
> Immediately before you declare the :tail task, add this:
>
>   p(respond_to?(:tail) ? method(:tail) : "no such method `tail'")
>
> If you see both "no such method `tail'" AND a string like "#<Method:
> Object(Kernel)#tail>", then you know you're including the file twice. If
> you only see the former (no such method) then something weird is going
> on and I have no idea what that is. If you see only the latter (the
> inspection of a method object), then you can see where the method is
> defined as part of the output.
>
> - Jamis
>
> On 2/13/09 3:31 PM, Michael Guymon wrote:
>
> > I am fairly certain deploy.rb is not being loaded twice, I tried
> > different combinations in the Capfile, double checked the
> > options[:sysconf] (is nil), options[:dotfile] (is nil),  and that
> > options[:recipes] only has a reference to the external deploy.rb
>
> > The rails instance is pretty basic, the plugins are
> > fixture_replacement2, restful_authentication, rspec, and rspec_on_rails.
> > Just to be safe, I removed everything but the restful_authentication
> > plugin but still got the ArgumentError. I have not defined any tail
> > methods nor are there any I can find.
>
> > thanks,
> > Michael
>
> > Jamis Buck wrote:
> >> So, regarding my last email, are you sure you're not loading (e.g.)
> >> deploy.rb twice?
>
> >> Second thing to check, make sure you (or a plugin) haven't declared a
> >> method named 'tail' on Object (or otherwise in the global namespace).
>
> >> - Jamis
>
> >> On 2/13/09 1:45 PM, Michael Guymon wrote:
>
> >>> First off, thanks for your help diagnosing my problems thus far Jamis,
> >>> I appreciate it.
>
> >>> My Capistrano::CLI implementation,http://pastie.org/388542, works
> >>> from rspec and the rails console, but gives the "ArgumentError:
> >>> defining a task named `tail' would shadow an existing method with that
> >>> name" in rails.
>
> >>> I have tried changing the Capfile and manually adding the Capfile to
> >>> the CLI impl class, but the ArgumentError still persists when run from
> >>> Rails
>
> >>> I guess it is not surprising that the ArgumentError is coming from
> >>> Capistrano::CLI::Execute method load_recipes(config):
> >>>   Array(options[:recipes]).each { |recipe| config.load(recipe) }
> >>> throws the ArgumentError
>
> >>> Is there a good way to debug how the tasks are being loaded into the
> >>> Capistrano::Configuration I am building?
>
> >>> thanks,
> >>> Michael
>
> >>> On Feb 13, 1:23 am, Jamis Buck <[email protected]> wrote:
>
> >>>> If you're loading Capfile, you don't need to also load deploy.rb (since
> >>>> Capfile loads deploy.rb). Perhaps the double load is causing problems?
>
> >>>> - Jamis
>
> >>>> On 2/12/09 11:15 PM, Michael Guymon wrote:
>
> >>>>> MMD::Actions::Cap is the class that is calling Capistrano as I 
> >>>>> described earlier (by including Capistrano::CLI::Execute, 
> >>>>> Capistrano::CLI::Options and handles steps for 
> >>>>> execute_requested_actions), the message 'MMD::Actions::Cap should run 
> >>>>> capistrano tasks' is the output from rspec. The Arguments error was a 
> >>>>> bug, sorry for that. Now the rspec correctly executes a 'cap staging 
> >>>>> deploy' from an external deploy.rb.
> >>>>> In Rails tho, I am still getting:
> >>>>>   capistrano/configuration/namespaces.rb:97:in `task': defining a task 
> >>>>> named `tail' would shadow an existing method with that name 
> >>>>> (ArgumentError)
> >>>>> which is being thrown from load_recipes(config) when the external 
> >>>>> deploy.rb is loaded. The error we indicate a collision of some sort, 
> >>>>> like the deployer.rb is being loaded twice somehow?
> >>>>> Here is a slimmed down version of the ruby I am attempt to execute from 
> >>>>> Rails:http://pastie.org/387991
> >>>>> thanks,
> >>>>> Michael
> >>>>> Jamis Buck wrote:
>
> >>>>>> On 2/12/09 9:17 PM, Michael Guymon wrote:
>
> >>>>>>> I should have been more clear in the first place, I am actually trying
> >>>>>>> to cap deploy another application from Rails, so it is trying to load
> >>>>>>> a deploy.rb that is not in the RAILS_ROOT.
> >>>>>>> In my rspec spec, if I load the Capfile first, then the external
> >>>>>>> deploy.rb, attempt to execute 'staging deploy' in Rails, I get the
> >>>>>>> strange error:
> >>>>>>> ArgumentError in 'MMD::Actions::Cap should run capistrano tasks'
> >>>>>>> wrong # of arguments(1 for 0)
>
> >>>>>> I have absolutely no idea what MMD::Actions::Cap is. It's definitely 
> >>>>>> not
> >>>>>> Capistrano.
> >>>>>> - Jamis
>
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to