title: How to handle errors from Fileutils cd
body: <p>I'm having troubles when using Fileutils method in ruby</p>
  
  <p>When using:</p>
  
  <pre><code>FileUtils.cd("A/non/existing/directory") 
  </code></pre>
  
  <p>I get an error output as expected but my ruby script violently ends.</p>
  
  <p>Question is how can I prevent my ruby script from stopping when I try to access to a
  non existing directory?</p>
  
  <p>I found this:</p>
  
  <pre><code>FileUtils.cd('/', :verbose =&gt; true)   # chdir and report it
  </code></pre>
  
  <p>but it doesn't work, or at least I don't know how the syntax works! </p>