 <p>assuming you are using rake to apply an active record migration. The file path will be relative to where you started rake which I'm sure will be the projects root.</p> <p>The file path would be:</p> <p>content = File.read("app/views/layouts/application.html.erb")</p>