Hello there. Newbie here. I can't see to run anything other than main.rb when I have created multiple files. I select a different file and click run, nothing happens, any suggestions greatly appreciated.
main.rb will always run first. You can, however, tell
main.rb to load other ruby files. Some examples:
require 'filename' #do not include .rb extension
require_relative 'filename.rb' #include the extension, I'd suggest this over require
load 'filename.rb' #don't forget .rb
What they do:
require_relative load the specified files along with the file it is in, meaning that the files are running simultaneously.
load exits out of the current file and loads only the file specified. I'd suggest this if you're just trying to load only the content of a specific file.
require often does not work in replit, so use