title: How can I connect to database using FXRuby
body: <p>I'd like to create an app that accesses db (with 1 table) and outputs its table in a window <strong>using FXRuby</strong>. Is there any way to make it <strong>without using query language</strong> like in this example:</p>
  
  <pre><code>require 'pg'
  
  conn = PG.connect(dbname: 'testdb', user: 'postgres')    
  rows = conn.exec("select * from users")
  </code></pre>
  
  <p>And <strong>without using Ruby on Rails</strong>.</p>
  
  <p>I've also tried to launch this example code, but it doesn't work beacause of the problem with installing <code>sqlite3 gem</code>:</p>
  
  <pre><code>require 'fox16' 
  require 'sqlite3.rb' 
  include Fox 
  
  class TestApp &lt; FXApp 
     def initialize 
        super('Test', 'Test') 
        @db = SQLite3::Database.new('test.db3') 
        @db || raise("can't connect to database") 
     end 
  
     def db 
        @db 
     end 
  end 
  </code></pre>