undefined method `require_gem'

When I run rake i get ’ undefined method `require_gem’’

Here’s my setup:

ruby:ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-freebsd6]
rails: 2.0.2
gem:1.0.1

Is this on a brand new Rails app?

Any plugins?

require_gem was deprecated and I assume it was removed, so one of your plugins or your Rails app is still calling it somewhere. If you built this app on a previous version of rails, then some of the initialization scripts may contain require_gem as well.

Thansk Brian. Turns out it was actually Rake that needed updating

I have the same error. - Undefined method require_gems. How do I update
rake?

How about:
gem update rake

I ran into this as well when I updated gems - all of the old gems
commands such as rails and rake were broken.

Chad Lester wrote:

How about:
gem update rake

I ran into this as well when I updated gems - all of the old gems
commands such as rails and rake were broken.

I thought of that one. Problem ... gem broke with everything else. When
I run

   gem update rake

I get

   /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Chad Lester wrote:

How about:
gem update rake

This - along with the info that things may have been installed in the
wrong places gave me a clue that appears to have fixed things.

Obviously, gem *HAD* been working. I used find to locate another version
of "gem" on my system. I backed up the one that was executing (as
reported by "which"), then created a symlink to the other one. Then I
could run gem

I then used gem to update rake and rails. It appears that everything is
working now.

Interesting.