hey all We''re planning an upgrade to rails 2.2.2 and i have a branch for this purpose. A guy on our team who set the branch up can run it fine, but i have this problem when i try to start mongrel. /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:96:in `add'': wrong number of arguments (2 for 1) (ArgumentError) (I get the problem starting the console as well but it carries on regardless whereas mongrel dies). This is the code in question, with the offending line commented: [code=ruby] class GemLocator < Locator def plugins gem_index = initializer.configuration.gems.inject({}) { |memo, gem| memo.update gem.specification => gem } specs = gem_index.keys specs += Gem.loaded_specs.values.select do |spec| spec.loaded_from && # prune stubs File.exist?(File.join(spec.full_gem_path, "rails", "init.rb")) end specs.compact! require "rubygems/dependency_list" deps = Gem::DependencyList.new deps.add(*specs) unless specs.empty? #breaks here deps.dependency_order.collect do |spec| Rails::GemPlugin.new(spec, gem_index[spec]) end end end[/code] The puzzling thing is that, looking at what ''specs'' is equal to, it''s an array containing two objects, corresponding to the has_many_polymorphs and mislav_will_paginate gems. Since its an array, it should be happily passed to a method taking (*specs). I don''t even know if the problem is with these gems...as far as i can tell i have the same gem setup as the guy who made this branch (for whom it works fine). Kind of out of ideas....can anyone offer any advice/clues? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Jan-09 17:43 UTC
Re: Problem starting rails 2.2.2 - rails/plugin/locator.rb
On 9 Jan 2009, at 17:35, Max Williams wrote:> > hey all > > We''re planning an upgrade to rails 2.2.2 and i have a branch for this > purpose. A guy on our team who set the branch up can run it fine, > but i > have this problem when i try to start mongrel.version of rubygems ? rails 2.2.2 requires 1.3.1 if my memory is correct. Fred> > > /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb: > 96:in > `add'': wrong number of arguments (2 for 1) (ArgumentError) > > (I get the problem starting the console as well but it carries on > regardless whereas mongrel dies). > > This is the code in question, with the offending line commented: > [code=ruby] class GemLocator < Locator > def plugins > gem_index = initializer.configuration.gems.inject({}) { |memo, > gem| memo.update gem.specification => gem } > specs = gem_index.keys > specs += Gem.loaded_specs.values.select do |spec| > spec.loaded_from && # prune stubs > File.exist?(File.join(spec.full_gem_path, "rails", > "init.rb")) > end > specs.compact! > require "rubygems/dependency_list" > deps = Gem::DependencyList.new > deps.add(*specs) unless specs.empty? #breaks here > deps.dependency_order.collect do |spec| > Rails::GemPlugin.new(spec, gem_index[spec]) > end > end > end[/code] > The puzzling thing is that, looking at what ''specs'' is equal to, > it''s an > array containing two objects, corresponding to the has_many_polymorphs > and mislav_will_paginate gems. Since its an array, it should be > happily > passed to a method taking (*specs). > > I don''t even know if the problem is with these gems...as far as i can > tell i have the same gem setup as the guy who made this branch (for > whom > it works fine). > > Kind of out of ideas....can anyone offer any advice/clues? > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Max Williams
2009-Jan-09 18:15 UTC
Re: Problem starting rails 2.2.2 - rails/plugin/locator.rb
Frederick Cheung wrote:> On 9 Jan 2009, at 17:35, Max Williams wrote: > >> >> hey all >> >> We''re planning an upgrade to rails 2.2.2 and i have a branch for this >> purpose. A guy on our team who set the branch up can run it fine, >> but i >> have this problem when i try to start mongrel. > > version of rubygems ? rails 2.2.2 requires 1.3.1 if my memory is > correct. > > FredI have 1.3.1. Thanks though... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---