Rake aborted! undefined method `gem' for main:Object

Hi,
there must be some configuration mistake but can someone help me out?
I have ruby, gem, rails and such installed.
version
ruby: 1.8.4
gem: 0.8.11
rails 1.2.2

If I do a

rake rails:update

I get the following:

Rake aborted!
undefined method `gem’ for main:Object

I get the same message when doing just
rake

any ideas?
Is there a problem with my path?

thanks in advance.

On Feb 9, 1:49 pm, “peppermonkey” [email protected] wrote:

Rake aborted!
undefined method `gem’ for main:Object

You need to update to the latest version of Rake, I believe.


Regards,

John W.

On Feb 9, 2:39 pm, “John W.” [email protected] wrote:

You need to update to the latest version of Rake, I believe.

Doh! I meant to say RubyGems. Update to the latest version of
RubyGems. gem update --system

seems the problem is not just with rake.
doing a

ruby script/generate model

gives the following:

./script/…/config/boot.rb:29: undefined method `gem’ for main:Object
(NoMethodError)
from script/generate:2

which looks to be the same problem.
I know gem is installed and at least partially working as I can do a

gem update rails --include-dependencies

and ruby seems to be working as well.

Not sure why ruby can’t talk to gem (or at least that is what seems to
be going on imo)

On Feb 9, 5:42 pm, “John W.” [email protected] wrote:

On Feb 9, 2:39 pm, “John W.” [email protected] wrote:

You need to update to the latest version of Rake, I believe.

Doh! I meant to say RubyGems. Update to the latest version of
RubyGems. gem update --system

Whoops. updated other stuff but forgot about updating gem’s itself.
lol. Thanks! That did the trick :smiley: