A
anoosh
what is the advantages and disadvantages of ruby vs. other programming
languages such as java, php, python
languages such as java, php, python
anoosh said:what is the advantages and disadvantages of ruby vs. other programming
languages such as java, php, python
what is the advantages and disadvantages of ruby vs. other programming
languages such as java, php, python
what is the advantages and disadvantages of ruby vs. other programming
languages such as java, php, python
xymip said:HI,
Using terminal with ruby I encountered a problem
with the puts command. Here is the track:
Last login: Sun May 13 05:42:08 on console
Welcome to Darwin!
[stefan's-computer-2:~] stivi% echo hello world
hello world
[stefan's-computer-2:~] stivi% ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
[stefan's-computer-2:~] stivi% puts 1+2
tcsh: puts: Command not found.
Has the command changed?
HI,
Using terminal with ruby I encountered a problem
with the puts command. Here is the track:
Last login: Sun May 13 05:42:08 on console
Welcome to Darwin!
[stefan's-computer-2:~] stivi% echo hello world
hello world
[stefan's-computer-2:~] stivi% ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
[stefan's-computer-2:~] stivi% puts 1+2
tcsh: puts: Command not found.
Has the command changed?
Thanks in advance
Stefan
xymip said:HI,
Using terminal with ruby I encountered a problem
with the puts command. Here is the track:Last login: Sun May 13 05:42:08 on console
Welcome to Darwin!
[stefan's-computer-2:~] stivi% echo hello world
hello world
[stefan's-computer-2:~] stivi% ruby -v
ruby 1.8.2(2004-12-25) [universal-darwin8.0]
[stefan's-computer-2:~] stivi% puts 1+2
tcsh: puts: Command not found.Has the command changed?
tcsh doesn't have a puts command and never had. Ruby has a puts command, but
you didn't actually start ruby, you entered the command into your shell.
You have to start the ruby interpreter or irb before you can enter ruby code.
In the meantime what is the best way to create a program file and then
run it via terminal?
Martin said:Edit the file with your favourite text editor, save it with a .rb
extension, then run it from the prompt using ruby <filename> <args>.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.