Configuring JRuby on Rails with sqlite3 database

Thursday, June 24, 2010

Trying to run on JRuby an existing Ruby on Rails application I was experiencing a problem related to native sqlite3 database drivers.
I've solved as follows.

First, install JDBC sqlite3 adapter driver:

jruby -S gem install activerecord-jdbcsqlite3-adapter

Second, change the DB configuration in the application editing the config/database.yml file and changing the development section as follows:

development:
  adapter: jdbcsqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000


Save and launch the application:

jruby script/server

You Might Also Like

0 commenti

Subscribe