Consider setting up RubyMine to add blank lines at the end of files.