title: Capistrano Rails app SQLite3 Cannot open Database
body: <p>I've managed to get a Rails app deployed with Capistrano to a server running NGinx &amp; Passenger. On deploy I was getting the "We're sorry, something went wrong" message &amp; was rather confused as the production log was blank. I then switched the <code>rails_env</code>  to <code>development</code> in my NGinx Conf &amp; now I'm getting:</p>
  
  <pre><code>SQLite3::CantOpenException
  
  unable to open database file
  Rails.root: /www/testcap/releases/20120407015032
  </code></pre>
  
  <p>I logged into the server, into the <code>current</code> folder within <code>testcap</code> (which I believe symlinks to the latest release) and ran <code>rake db:create</code>, however the db files exist. Having looked within the app's <code>db</code> folder I see both <code>development.db</code> &amp; <code>test.db</code>. </p>
  
  <p>If I run <code>rails s -e production</code> and then head to myurl.com:3000 the app works completely fine, which is weird, and it also works fine when I run <code>rails s -e development</code> too.</p>
  
  <p>I'm at a complete loss as to what the issue might be here. I'm sure it must be a relatively obvious issue, potentially with capistrano? I'm still new to it so I could well have missed anything but googling so far has been fruitless.</p>
  
  <p>The only thing I can think of is that I've nothing explicitly relating to databases in my <code>config/deploy.rb</code> ? However I've not been able to find any guides on the net to help out thus far.</p>
  
  <p>Thanks in advance for your help :)</p>
  
  <p>Jack.</p>