+ 2

Hi. What is the file extension for a ruby file on notepad ?since i personally prefer using notepad++.thanks.

ruby on notepad++

24th Dec 2016, 6:43 PM
Tiffany Kisiero
Tiffany Kisiero - avatar
5 Respuestas
+ 3
.rb
3rd Jan 2017, 10:30 PM
Dull Bananas
Dull Bananas - avatar
+ 3
Executing a Ruby Program: 1) Install Ruby. 2) Write code in notepad and click 'Save As'. 3) Set 'Name' to whatever you want + '.rb' and 'Type' to 'All Files' and click OK. 4) Open Ruby Console and run your program.
5th Jan 2017, 2:34 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 2
The file extension is as usual .rb If you are using Notepad++, I don't think that extension is a problem. But for Notepad, when you choose Save As, set 'Save as type' to 'All Files' (if .rb option is unavailable) and the after typing whatever name you like, add .rb to the end of it. Hope this helps.
24th Dec 2016, 7:17 PM
PythonProMaybe
+ 2
it actually did😊 .However, i dont quite know how to run the code, should i run it using the normal procedure of running html lines of code.
25th Dec 2016, 9:55 AM
Tiffany Kisiero
Tiffany Kisiero - avatar
+ 2
Basically when you save the file with the extension .rb, and open it afterwards, the code which was typed in it (using Notepad) will be run in the Ruby Console. So yes, it's pretty much like you double-click a .htm file and it opens in your browser. :)
25th Dec 2016, 8:47 PM
PythonProMaybe