File.size returns the size of a file in bytes.
If the file doesn't exist, an exception is thrown.
puts File.size("main.rb")