# Problem starting rails 2.2.2 - rails/plugin/locator.rb

**URL:** <https://www.ruby-forum.com/t/problem-starting-rails-2-2-2-rails-plugin-locator-rb/157349>\
**Category:** Rails\
**Created:** [January 9, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/problem-starting-rails-2-2-2-rails-plugin-locator-rb/157349 "2009-01-09T18:35:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 9, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/problem-starting-rails-2-2-2-rails-plugin-locator-rb/157349/1 "2009-01-09T18:35:15Z")

</div>

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:

` 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`  
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?

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 9, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/problem-starting-rails-2-2-2-rails-plugin-locator-rb/157349/2 "2009-01-09T18:44:09Z")

</div>

On 9 Jan 2009, at 17:35, Max W. 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

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 9, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/problem-starting-rails-2-2-2-rails-plugin-locator-rb/157349/3 "2009-01-09T19:15:19Z")

</div>

Frederick C. wrote:

> On 9 Jan 2009, at 17:35, Max W. 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

I have 1.3.1. Thanks though…
