SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble starting a directory structure

    Hi guys.

    I have downloaded the sample Sitepoint book about Ruby on Rails with a view to buying the whole thing when I reach the end.

    I have installed instant rails and done the update etc and I am now up page 40 (Building a Foundation). I have opened the Ruby Console Window and typed in the following rails shovell as instructed but it doesn't seem to do anything.... below is the output.... I'm stumped.

    Code:
    C:\InstantRails\rails_apps>rails shovell
    C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record.rb:34: undefined method `gem' for main:Object (NoMethodError)
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in `activate'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in `activate'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:167:in `activate'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:166:in `activate'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:37:in `require_gem_with_options'
            from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:31:in `require_gem'
            from C:/InstantRails/ruby/bin/rails:17
    
    C:\InstantRails\rails_apps>

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd recommend not using instant rails. It's one of those utilities that attempts to simplify something (that is really very simple already) by cobbling it together in a complicated single application.

    It is very easy to install Rails on a Windows system. Install the Ruby one click installer, then use gems to install rails and finally install MySQL. You'll find a fuller description of what you need here:

    http://www.sitepoint.com/forums/showthread.php?t=502929

    I'd also add, for MySQL the community edition "Windows Essentials" version is fine:

    http://dev.mysql.com/downloads/mysql/5.1.html

  3. #3
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    I just bought the book, and I'm in the same boat as the original poster, exact same error. I understand what you're saying about not using InstantRails, and will go the other route if needed, but is this going to negatively affect building the application in the book? The author has already stated that different versions of Ruby may not work well with the app, so I'm a little hesitant to stray from his directions.

    Thanks,
    Kiragan

  4. #4
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Delete InstantRails directory
    Extract from zip file again
    Open the Instant Rails console
    Do NOT run the update (gem install rails --include-dependencies)
    Type rails shovell

    Worked for me. It means I'm using an old version, but at least it should be compatible with the app in the book so I can learn.

    Kiragan


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
  •