title: Rails 3.1: Sqlite exception
body: <p>I try to launch really simple Ruby on Rails app on VDS. I use Nginx, Phusion Passenger and Sqlite3. I have root rights.</p>
  
  <p>Code of creating project:</p>
  
  <pre><code>$ rails new myapplication
  $ cd /rails_apps/myapplication
  $ bundle install
  $ rails generate scaffold Post name:string title:string content:text
  $ RAILS_ENV=production rake db:migrate
  </code></pre>
  
  <p>I can visit main page, it shows ok. But when i try insert data into DB, i get next:</p>
  
  <pre><code>SQLite3::ReadOnlyException: attempt to write a readonly database: INSERT INTO "posts" ("content", "created_at", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?)
  </code></pre>
  
  <p>How can i fix that?</p>
  
  <p>UPD:  </p>
  
  <pre><code>chmod 777 \db
  </code></pre>
  
  <p>Helped me.</p>