SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Montreal
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question problem starting mongrel

    Hello, I have just purchased Simply Rails 2 by Patrick Lenz. I am trying to get Mongrel started, on page 43 Patrick says that one must enter the command ruby script/server from the shovell directory at the command line. It doesn't work, DOS says no such command or directory. I am using Windows XP. I created the various directories from windows and not from the rails command as suggested because the rails command wouldn't work, maybe this has something to do with it.

    Thanks for any help.

    Cheers,

    Jacques
    JJJack

  2. #2
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like you're running a regular DOS prompt. You have to use a Ruby shell or it doesn't recognize those commands. You should be able to run a Ruby shell with InstantRails. I think the book tells you how, right? After that, you should erase all those directories you built (so that you get all of the essential scripts and whatnot) and run "rails APPNAME" in a RUBY shell. It'll *should* work then.

    I use Linux primarily, so correct me if I'm wrong.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Montreal
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi grenadier, thanks for your response. I am using the ruby console and then opening the ruby console window just as shown in the book. However, this ruby console is a dos window, something strange here.

    J
    JJJack

  4. #4
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to do this:

    • Open a Command (DOS) window
    • enter cd path_to_application where path_to_application needs to be the address of the folder your application is in. So say it is at "C:\web app\my_app" you would enter cd 'c:\web app\my_app'
    • then enter ruby script/server

    If this doesn't work, I expect that you don't have Ruby and/or Rails correctly installed.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Montreal
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Yes, but this does not work. But I am not sure what could have gone wrong with the installation, it is a simple matter of unzipping the files into a directory and then starting ruby with instantrails.exe. Am I missing something?

    J
    JJJack

  6. #6
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    I imagine you would have to install Ruby itself first, that would explain why the command 'ruby' isn't recognized.

  7. #7
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't listen to the book. DON'T USE INSTANTRAILS. Many people on this forum have asked about problems they're having with instantrails.

    InstantRails is supposed to be easier to install, but Ruby already is extremely easy to install: just download the Ruby One Click installer and double click the installer. Done. Just like any other Windows application.

    http://rubyforge.org/projects/rubyinstaller/

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Montreal
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Thanks for the tip. Since this is very different from the book, how does one get to the ruby console now?

    Cheers,

    Jacques
    JJJack

  9. #9
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I have Windows98 and couldn't use InstantRails. I had to hack some http://www.sitepoint.com/forums/showthread.php?t=563276 but I finally got things working. I've been accessing the ruby console (and the irb and sqlite3 consoles too) By starting the RDoc server from the start menu, and then starting the RubyGems Package Manager. i.e.
    C:\ruby>cd c:\ruby\shovell
    C:\ruby\shovell>ruby script/console
    Loading development environment (Rails 2.1.0)
    >>


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
  •