Fixed template errors related to application.rb and stage.rb files.