# Rake and rake aborted! Rake aborted! undefined method \`gem'

**URL:** <https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085>\
**Category:** Ruby\
**Created:** [February 9, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085 "2007-02-09T22:50:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peppermonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e56c9b/32.png) [@peppermonkey](https://www.ruby-forum.com/u/peppermonkey)\
**Post date:** [February 9, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085/1 "2007-02-09T22:50:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peppermonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e56c9b/32.png) [@peppermonkey](https://www.ruby-forum.com/u/peppermonkey)\
**Post date:** [February 9, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085/2 "2007-02-09T23:06:55Z")

</div>

On 2/9/07, peppermonkey [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> any ideas?  
> Is there a problem with my path?

I know the newest version of rails requires the newest version of  
rubygems,  
this is where Object#gem comes from.

thanks in advance.

---

<div class="post-metadata">

**Author:** ![peppermonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e56c9b/32.png) [@peppermonkey](https://www.ruby-forum.com/u/peppermonkey)\
**Post date:** [February 10, 2007, 5:44am UTC](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085/3 "2007-02-10T05:44:38Z")

</div>

On 2/9/07, peppermonkey [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

yes, you need the latest version of rubygems.

Do:

sudo gem update --system

and consult the rubygems 0.9.2 release notes if you have trouble.
