Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?

Kenneth McDonald
Tue, 30 Sep 2008 16:39:24 -0000

Heh, rake rails:update gives the same error. Sigh. Advice much
appreciated, though.

Apparently I have an old lib of some sort hanging around that needs to
be updated, but
I don''t know how to find out what it is, let alone do the update. I am
running rails 2.x.

Thanks,
Ken

On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote:

>
>
>
> On Sep 30, 5:18 pm, Kenneth McDonald
> <kenneth.m.mcdon...-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org> wrote:
>> I''m getting the following when doing a db:migrate after
installing
>> RoR
>> 2+:
>>
>> Macintosh-4:ui Ken$ rake db:migrate
>> /usr/local/bin/rake:17: undefined method `require_gem'' for
>> main:Object
>> (NoMethodError)
>>
>> I have done a '' sudo gem update --system''. Any
thoughts as to what
>> might be causing this?
>>
>
> Your app was written for an old version of rubygems. require_gem was
> deprecated a while back (replaced with gem) and eventually removed.
> If you''ve just updated your app to a new version of rails, then
> running rake rails:update will update things like boot.rb which may
> have been using require_gem
>
> Fred
>> This is on OS X 10.5
>>
>> Thanks,
>> Ken