title: Where is the database file created in this code?
body: <p>I have this code embedded in a .html.erb file:</p>
  
  <pre><code>require 'sqlite3'
  
  # Open a SQLite 3 database file
  db = SQLite3::Database.new 'file.db'
  
  # Create a table
  result = db.execute &lt;&lt;-SQL
    CREATE TABLE numbers (
      name VARCHAR(30),
      val INT
    );
  SQL
  
  # Insert some data into it
  { 'one' =&gt; 1, 'two' =&gt; 2 }.each do |pair|
    db.execute 'insert into numbers values (?, ?)', pair
  end
  
  # Find some records
  db.execute 'SELECT * FROM numbers' do |row|
    p row
  end
  </code></pre>
  
  <p>As you can see the code is creating a database, then create a table, etc..
  <strong>My problem</strong>: I don't know where the file "file.db" is created. I have searched for it on the whole Windows, but I cannot find it.</p>
  
  <p><strong>NOTE 1:</strong> it seems the file and the table are being created, because if I request for the same .html.erb, I get <code>Error: the table 'numbers' already exists.</code></p>
  
  <p><strong>NOTE 2:</strong> I know this is not the best place to add the ruby code related to a database. I know I should write it on the controller.</p>
  
  <p>Here it is the full code:</p>
  
  <pre><code>&lt;%
  
  require 'sqlite3'
  
  # Open a SQLite 3 database file
  db = SQLite3::Database.new 'development.sqlite3'
  
  # Create a table
  result = db.execute &lt;&lt;-SQL
    CREATE TABLE numbers (
      name VARCHAR(30),
      val INT
    );
  SQL
  
  # Insert some data into it
  { 'one' =&gt; 1, 'two' =&gt; 2 }.each do |pair|
    db.execute 'insert into numbers values (?, ?)', pair
  end
  
  # Find some records
  db.execute 'SELECT * FROM numbers' do |row|
    p row
  end
  
  %&gt;
  
  &lt;h1&gt;Welcome#index&lt;/h1&gt;
  &lt;p&gt;Find me in app/views/welcome/index.html.erb&lt;/p&gt;
  </code></pre>