When I go to command prompt and type in...
ruby hello.rb
Thats what I saved my program as. the output is ...
hello.rb is not recognized as an internal or external command. Operable program or batch file.
I am so frustrated. Can anybody help me please?
7 replies to this topic
#1
Posted 18 December 2011 - 09:05 PM
|
|
|
#2
Posted 18 December 2011 - 09:15 PM
Would this work?:
ruby ./hello.rb
---------- Post added at 09:15 PM ---------- Previous post was at 09:12 PM ----------
Or the other thing, did you save hello.rb in the documents folder? If so, try this:
chdir %userprofile%\documents
ruby hello.rb
ruby ./hello.rb
---------- Post added at 09:15 PM ---------- Previous post was at 09:12 PM ----------
Or the other thing, did you save hello.rb in the documents folder? If so, try this:
chdir %userprofile%\documents
ruby hello.rb
#3
Posted 18 December 2011 - 09:32 PM
I tried that it did not work.
Thanks though.
Thanks though.
#4
Posted 18 December 2011 - 09:36 PM
I am surprised that there is a 'ruby' command in Windows (or is it Windows?).
On my computer it's more like this:
chdir desktop
\ruby\bin\ruby file.rb
Have you tried saving the *.rb file to C:\ and then this?:
ruby \hello.rb
On my computer it's more like this:
chdir desktop
\ruby\bin\ruby file.rb
Have you tried saving the *.rb file to C:\ and then this?:
ruby \hello.rb
#5
Posted 19 December 2011 - 09:32 PM
If you are working on Windows it would be a good idea to add ruby's bin directory to your path. Then you can access it as just 'ruby'.
Latinamne loqueris?
#6
Posted 20 December 2011 - 01:58 PM
Do OpenFile () and similar functions check the bin directory?
Because my written-from-scratch web server requires server-side scripts to have the path to the interpreter at the top like this:
The HTTP/1.0... response line is not required, and if omitted it would be added, but the double-"\r\n" sequence is required, and is not checked for; I'm talking about my server.
* * *
@xmtoxm: Did you find the solution yet?
Because my written-from-scratch web server requires server-side scripts to have the path to the interpreter at the top like this:
#!/strawberry/perl/bin/perl.exe print "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"; [I]... some more code ... [/I]
The HTTP/1.0... response line is not required, and if omitted it would be added, but the double-"\r\n" sequence is required, and is not checked for; I'm talking about my server.
* * *
@xmtoxm: Did you find the solution yet?
#7
Posted 20 December 2011 - 05:49 PM
Thanks for answering back you guys. I really appreciate it.
mebob could you explain what to add to the ruby's bin of the directory. Thanks.
RhetoricalRuvim's I have not found the solution. I have tried what you have said but no luck.
mebob could you explain what to add to the ruby's bin of the directory. Thanks.
RhetoricalRuvim's I have not found the solution. I have tried what you have said but no luck.
#8
Posted 28 January 2012 - 10:37 AM
I finally got ruby working on my computer. "Throws confetti"
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









