Results 1 to 6 of 6

Thread: windows command line problem

  1. #1
    Join Date
    Apr 2006
    Beans
    100

    windows command line problem

    I'm writing an IDE in java for ruby programming. The problem comes when it's time to execute the ruby program... Doing this on ubuntu( and/or any other linux variant) is a piece of cake... Windows seems to be the problem here. I'm trying to specify the absolute path name for ruby and the file name to pass it... however it's not working that easily. This is what I'm trying to do on windows...

    C:\ruby\bin\ruby.exe C:\Documents And Settings\cdancy\Desktop\test.rb

    then it gives the error that C:\ruby\bin\ruby.exe is not recognized as an internal or external command. I have no idea what to do and their are no windows forums that i know of, So i've come here for answers if anyone knows?

    Sincerely,
    Chris Dancy

  2. #2
    Join Date
    Apr 2009
    Location
    Germany
    Beans
    2,134
    Distro
    Ubuntu Development Release

    Re: windows command line problem

    the quotes for the path containing spaces are missing in what you wrote.
    C:\ruby\bin\ruby.exe "C:\Documents And Settings\cdancy\Desktop\test.rb"

  3. #3
    Join Date
    Mar 2009
    Beans
    15

    Re: windows command line problem

    Missing quotes would not explain why he is getting the message "C:\ruby\bin\ruby.exe is not recognized as an internal or external command"

    I'd say the the OS cannot find ruby.exe. It's a dumb question, but are you sure that the directory "C:\ruby\bin\" exists?

  4. #4
    Join Date
    Apr 2006
    Beans
    100

    Re: windows command line problem

    To darryl and Madcow... putting the file argument in quotes actually worked... which is odd. By any chance you guys would not happen to know how to keep the windows command prompt open after the program exits? Im looking for something similar to how xterm does...

    xterm -hold -e <some program> <some file>

  5. #5
    Join Date
    Dec 2007
    Location
    The last place I look
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: windows command line problem

    Quote Originally Posted by christoforever View Post
    To darryl and Madcow... putting the file argument in quotes actually worked... which is odd. By any chance you guys would not happen to know how to keep the windows command prompt open after the program exits? Im looking for something similar to how xterm does...

    xterm -hold -e <some program> <some file>
    in dos, you would use "Pause". the user will see "Press any key to continue". if it is the last line in your bat, then the prompt will close.

    I would execute from a batch, and put the pause command at the bottom.

  6. #6
    Join Date
    Apr 2006
    Beans
    100

    Re: windows command line problem

    I'm not going to lie to you, I have heard of batch files( which i assume is like a shell script ), but I've not used windows as an operating system on a day to day basis in over 6 years. The only reason I'm writing this program to include windows is for not alienating the potential amount of users who may be using the program and for the sake of completeness as a java application. So.... DAMN WINDOWS!!!!

Tags for this Thread

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
  •