Forum: Ruby on Rails Problem starting rails 2.2.2 - rails/plugin/locator.rb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Max W. (Guest)
on 2009-01-09 19:35
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?
Frederick C. (Guest)
on 2009-01-09 19:44
(Received via mailing list)
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
Max W. (Guest)
on 2009-01-09 20:15
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...
This topic is locked and can not be replied to.