+ 2
Hi. What is the file extension for a ruby file on notepad ?since i personally prefer using notepad++.thanks.
ruby on notepad++
5 Answers
+ 3
.rb
+ 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.
+ 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.
+ 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.
+ 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. :)