title: Download video from URL in ruby on rails
body: <p>Currently I am using system command wget to download the video and store in our server:</p>
  
  <pre><code>system("cd #{RAILS_ROOT}/public/users/familyvideos/thumbs &amp;&amp; wget -O sxyz1.mp4 #{video.download_url}")
  </code></pre>
  
  <p>but it's saying:</p>
  
  <pre><code>cd: 1: can't cd to /var/home/web/***.com/public/users/familyvideos/thumbs
  </code></pre>
  
  <p>Anybody has any idea? Also please provide alternative option to do this.</p>