Ruby(1)----Get Started
If you have already been familiar with Java, C++ or other OO languages, these articles will let you be a Ruby developer ASAP. I won't explain any OO concepts here.
1.0 Set up develop environment (Windows)
1. Download Instant Rails ( here uses version 1.5) and install it to %RAIL_PATH%.
1.1 First Example
1. Start a Command Window, and change to %RAIL_PATH%, run use_ruby.cmd.
2. Create a ruby file hello.rb, paste the following code.
puts sayHello("Ruby") # Write to the console
def sayHello(name)
result = "Hello, " + name
return result
end
3. run ruby hello.rb, see what you get.
浙公网安备 33010602011771号