SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question undefined method for main object

    Hi,
    I am new at rails and I cant seam to get past this error. Can someone help?


    ./script/../config/boot.rb:29 undefined method gem for main:Object (NoMethodError)
    from c:/installRails/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in 'require'
    from script/server:2

  2. #2
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sorry about that

    Sorry I fixed my own error. I had not installed ruby.

  3. #3
    SitePoint Guru mattymcg's Avatar
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi zine27.

    The update to Rails that occurred earlier this month resulted in Rails relying on a more recent version of RubyGems than the one released with InstantRails 1.3a. This is mentioned on the book's errata page. To update RubyGems, type the following at the command line:

    Code:
    gem update --system
    The whole point of InstantRails is that you should not have to "install ruby". But you do need to operate from a command line window that is launched from within InstantRails (click on the black I, then select Rails Applications > Launch Ruby Console Window). If you try and use ruby, the gem command or rails from a regular command prompt, it also might throw an error like the one you reported.

    Hope that helps.
    Last edited by mattymcg; Feb 19, 2007 at 04:49. Reason: Added link to errata page
    I design beautiful, usable interfaces. Oh, and I wrote a kids' book.
    Follow me on Twitter.
    Read my blog.
    Buy my book, Charlie Weatherburn and the Flying Machine.

  4. #4
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having the same problem. I tried running
    gem update --system
    from a InstantRails cmd window and it seemed to work until the very end where it gave this message:

    Successfully built RubyGem
    Name: sources
    Version: 0.0.1
    File: sources-0.0.1.gem
    hook C:/InstantRails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rubygems-update-0.9.2/./post-install.rb failed:
    undefined method `post_install_message' for #<Gem::Specification:0x2c46068>
    Try 'ruby setup.rb --help' for detailed usage.
    RubyGems system software updated



    Any suggestions?

  5. #5
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Linux?

    Seriously, Windows is a PITA for ruby development as everything has to be setup. If you switch to a good distro like Ubuntu, Debian, etc, you'll make life easier. Ubuntu Linux has got to the stage where it's easier to use than Windows imo. The only need for Windows is for Photoshop and Firebug now.

    It does look like you might have path issues (hazarding a wild, but reasonable guess)
    http://virtualfunction.net - Rails Web Development
    http://squaremove.co.uk - Rails powered Property Listings

  6. #6
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is not windows, it's InstantRails. Ruby works fine if you use the One Click Ruby Installer. I don't know if InstantRails is the problem here, but in general the One Click Ruby Installer works and InstantRails doesn't.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •