I have a Windows and I'm using Ruby 1.9.1-p429, and it won't allow me to view my test.rb file on cmd when i type cd. I'll go through step-by-step of what I did.

I saved a test .rb file on Sublime to my desktop. I open cmd and type "cd", expecting it to list the test.rb file, as the About.com tutorial said it would. Nothing shows up.

I go to the files on my desktop and open it. It says I need a program to open it with. I try opening it with Ruby Interactive. Nothing. The same thing happens when i try to open it with cmd. Now all the save files try to open it with cmd.

Any suggestions?

  • 1
    It really sounds like you don't understand how to use your operating system; These are basic skills you are talking about. cd means "change directory", and only is used to change from one directory and make another the default directory. dir is the command used to list files.
    – TTM
    Apr 16, 2013 at 7:30
  • cd doesn't list files - dir does
    – Frederick Cheung
    Apr 16, 2013 at 7:31
  • Why are you using Ruby 1.9.1? That version is woefully out of date and wasn't entirely production ready. 1.9.2 or better is a lot better.
    – tadman
    Apr 16, 2013 at 8:15

1 Answer 1


Ruby files should be opened with ruby.exe, wherever that is on your system.

  • I try to open a file using Ruby.exe, and the screen opens for a split second and then shuts off. I am aware that this version of Ruby is outdated by I was instructed to use it by About.com through instructions for App Academy.
    – Ian Steffy
    Apr 16, 2013 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.