Forum: Ruby on Rails undefined method `gem' for main:Object (NoMethodError)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E6c03dab69dcb70b8e22f7ba45ea0e5b?d=identicon&s=25 DigitalWarfare@gmail.com (Guest)
on 2007-02-19 21:44
(Received via mailing list)
fiercefe@sh113 [~/public_html/ruby_test]# ruby script/server
./script/../config/boot.rb:29: undefined method `gem' for main:Object
(NoMethodError)
from script/server:2


I did: rails ruby_test

then I tried to create a controller as shown above and incurred
errors, wondering if you know what's wrong. Additionally I can't run
the command: ruby script/server to start the server on the ruby
folder.

Any idea what to do from here? Should I contact my hosting?
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2007-02-19 21:56
(Received via mailing list)
I think you need to start your webserver from the application root
directory.

hth,
Bill
A99870c1391c39da2089649745965bda?d=identicon&s=25 Jean-François Trân (Guest)
on 2007-02-19 22:17
(Received via mailing list)
2007/2/19, DigitalWarfare@gmail.com <DigitalWarfare@gmail.com>:

> the command: ruby script/server to start the server on the ruby
> folder.
>
> Any idea what to do from here? Should I contact my hosting?

You've got Rails 1.2.2 and Rubygems < 0.9.0, and gem
replaces require_gem method (see :

http://weblog.rubyonrails.org/2007/2/6/rails-1-2-2...

). So downgrade Rails or upgrade RubyGems.

   -- Jean-François.

--
Ruby ( http://www.rubyfrance.org ) on Rails ( http://www.railsfrance.org
)
This topic is locked and can not be replied to.