Ruby on rails 3 heroku上rake任务中的文件路径
我在Rails中有一个rake任务,基本上就是打开一个文件并编写一些文本,我有Ruby on rails 3 heroku上rake任务中的文件路径,ruby-on-rails-3,heroku,Ruby On Rails 3,Heroku,我在Rails中有一个rake任务,基本上就是打开一个文件并编写一些文本,我有 def self.log File.open("#{Rails.root.join("app/views/main/log.html.erb")}", "a+"){|f| f << "sometext" } end def self.log File.open(“#{Rails.root.join”(“app/views/main/log.html.erb”),“a+”{f|fHerok
def self.log
File.open("#{Rails.root.join("app/views/main/log.html.erb")}", "a+"){|f| f << "sometext" }
end
def self.log
File.open(“#{Rails.root.join”(“app/views/main/log.html.erb”),“a+”{f|fHeroku的文件系统是只读的。这篇文章中突出显示了:。希望有帮助。Heroku的文件系统是只读的。这篇文章中突出显示了:。希望有帮助