[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

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

peppermonkey

2/9/2007 9:50:00 PM

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.

4 Answers

peppermonkey

2/9/2007 10:19:00 PM

0

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)

John Wilger

2/9/2007 10:40:00 PM

0

On Feb 9, 1:49 pm, "peppermonkey" <peppermon...@moose-mail.com> wrote:
> 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.

--
Regards,

John Wilger

John Wilger

2/9/2007 10:42:00 PM

0

On Feb 9, 2:39 pm, "John Wilger" <johnwil...@gmail.com> 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`

peppermonkey

2/9/2007 10:47:00 PM

0

On Feb 9, 5:42 pm, "John Wilger" <johnwil...@gmail.com> wrote:
> On Feb 9, 2:39 pm, "John Wilger" <johnwil...@gmail.com> 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 :D