简体   繁体   English

在nitroous.io上执行简单的ruby应用程序

[英]Executing simple ruby apps on nitrous.io

I am currently doing a tutorial on ruby and am using the Nitrous.io IDE. 我目前正在编写有关ruby的教程,并且正在使用Nitrous.io IDE。 I was wondering how I can run a simple ruby app in the console. 我想知道如何在控制台中运行一个简单的ruby应用程序。 The lines of code in my test.rb are no more than 5 lines. 我的test.rb中的代码行不超过5行。 This website says that I should use "load 'file_name.rb'" but that does nothing. 这个网站说我应该使用“ load'file_name.rb'”,但是什么也没做。 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. 当我在本地计算机(Windows)上尝试该操作时,出现“无法加载此类文件”,但该文件位于同一目录中,并且仍然无法正常工作。 Could someone please help. 有人可以帮忙。 Thank you in advance! 先感谢您! http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html 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 ):

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 ). 如果需要在Nitrous盒子上安装Ruby,则可以通过Autoparts进行 parts install ruby2.1parts install ruby2.1 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM