Ask coding questions

← Back to all posts
Saving Program

In the introduction to programming, one of the first steps is to "save your program as first_program.rb". I do not, however, see any options to save and name a program.

vedprad1 automatically saves your file as main.rb, so you do not need to worry about that.

Unfortunately, you cannot change the name to first_program.rb. This is because has to run the file, not you. In real life, you would right ruby first_program.rb into the console, but you cannot do that on That's why you can only run the file called main.rb.

There is one advantage to this, though. Instead of dealing with the command line, you just have to click run. You have to pay this cost though.

By the way, there is an error in your code. The first line ( should not actually be in your program. Delete that line.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!


the program is already saved automatically, and you can rename your repl by clicking on the pencil icon next to the repl name in the top-left hand corner


@theangryepicbanana : Actually, you can only rename the repl, but not the file name, which is what he is asking.


@vedprad1 oh well you can't actually do that on it has to be called "main" otherwise it won't run