Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 heroku上rake任务中的文件路径_Ruby On Rails 3_Heroku - Fatal编程技术网

Ruby on rails 3 heroku上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

我在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|fHeroku的文件系统是只读的。这篇文章中突出显示了:。希望有帮助。

Heroku的文件系统是只读的。这篇文章中突出显示了:。希望有帮助