Strange "no such file to load -- sqlite3" error


I’m porting my existing Rails project to Jruby, under a tomcat .war

jruby script/server on the project
works just fine, no problem with dependencies

adapter: jdbcsqlite3
database: db/development.sqlite3
timeout: 5000
encoding: utf8

Ok, now I warble the entire project and deploy the resulting .war file.
Under Tomcat, when I access my webapp I get:

MissingSourceFile in LoginController#index

no such file to load – sqlite3

Hmm? Why does it even try to load this source? It has
activerecord-jdbcsqlite3-adapter, which works fine.
Warble config file has

config.gems += [“activerecord-jdbcsqlite3-adapter”, “jruby-openssl”,

I checked all my sources, none do an explicit “require ‘sqlite3’” or
And besides, just running webbrick under jruby worked fine, so…

What’s happening?

The error happens in custom_require.rb in
, which dynamically loads all required gems. I have a feeling it’s
the idea it should load sqlite3 too (which is native so not available to
JRuby)… where does it get that idea from?

View this message in context:"no-such-file-to-load----sqlite3"-error-tp23922951p23922951.html
Sent from the JRuby - User mailing list archive at

To unsubscribe from this list, please visit:


This has happened in the past with do_sqlite3, which contained a
in the path, because Rubygems looks for .dll files (among other files),
finds one, and then fails to load it.

Do you have a sqlite.dll or in your path somewhere?

– Yehuda