Hello
@jazzvaga,
What methods / commands / execution functions you use to deal with your code in Ruby Language?
Do you mean what are the command-line switches to use Ruby?
If you want to test a one-liner you can do it with the
-e switch, with the format:
ruby -e '<your code here>'
for instance:
Code:
ruby -e 'puts "Hello WebmasterServe"'
If you want to interpret your program, you simply pass it to ruby in the command line:
ruby <your program's file path here>
Say you saved your program as the file
wms.rb
Code:
puts "Hello WebmasterServe"
You would run it like:
If you want to execute your program directly as any other program in your box, then you would add a
shebang + ruby's interpreter path as your program's first line:
Code:
#!/usr/bin/ruby
puts "Hello WebMasterServe"
Then give it execution permission with CHMOD:
And finally run it as you would do with any other program: