If the file is empty, what do you want to read exactly?
The second parameter for File#read is optional, and should be the length of the String you want to read out of the file. "wb" isn't an Integer, hence the error messsage.
The parameters you used look more like open.
Read a file
If you want to read the file, just use
content = File.read(filename)
Write a file
If you want to write it, you can use
File.open(filename,'w+') do |file|
file.puts "content"
end
'w+' is a file mode which :
Overwrites the existing file if the file exists. If the file does not
exist, creates a new file for reading and writing.
Existence of a file
If you want to check that a file exists :
File.exists?(filename)
Is a file empty?
If you want to check that an existing file is empty :
File.size(filename)==0
The file could be full of whitespaces (size > 0, but still "empty"). With Rails :
File.read(filename).blank?