I tried this tutorial but it didn't give me a开发者_JAVA技巧ny output.
Ruby is not a compiled language, but an interpreted one. If you want to get an output, you can run irb
(Interactive Ruby Shell) in the command line, and enter the code in line-by-line or run it in the command line as ruby FILE_NAME.rb
. This should provide the output you are looking for. In my opinion and experience, the command line is the best way to work with ruby.
Since this is plain ruby code, you should follow this article (Notepad++ with C#) and replace the compiler with the Ruby compiler like RubyScriptToExe, or to the ruby command line interpreter
精彩评论