title: Error in creating new file
body: <p>When I run this code in irb:</p>
  
  <pre><code>File.open('j1.txt','w') {|f| f.write("doc1223423")}
  </code></pre>
  
  <p>it works successfully. But when I do the same in a method in my controller, it gives the following error:</p>
  
  <pre><code>Errno::ENOENT (No such file or directory - file location as specified )
  </code></pre>
  
  <p>Why does it do that and how do I fix it?</p>