I am currently doing a tutorial on ruby and am using the Nitrous.io IDE. I was wondering how I can run a simple ruby app in the console. The lines of code in my test.rb are no more than 5 lines. This website says that I should use "load 'file_name.rb'" but that does nothing. And when I try that on my local computer (Windows), I get "cannot load such file" I have the file located within the same dir and it still does not work. Could someone please help. Thank you in advance! http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html
To run a ruby file, type in the following command within the terminal (replacing file-name.rb
with your actual file):
ruby file-name.rb
If you need to install Ruby on your Nitrous box then you can install this through Autoparts ( parts install ruby2.1
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.