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

P

peppermonkey

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.
 
P

peppermonkey

seems the problem is not just with rake.
doing a

ruby script/generate model <insert name>

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)
 
J

John Wilger

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

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

John Wilger

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`
 
P

peppermonkey

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 :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top