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?