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


#1

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

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

production:
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”,
“soap4r”]

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

What’s happening?

The error happens in custom_require.rb in
file:/C:/bin/apache-tomcat-5.5.27/webapps/JCyberTrack/WEB-INF/lib/jruby-complete-1.3.0RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
, which dynamically loads all required gems. I have a feeling it’s
getting
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:
http://www.nabble.com/Strange-"no-such-file-to-load----sqlite3"-error-tp23922951p23922951.html
Sent from the JRuby - User mailing list archive at Nabble.com.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#2

This has happened in the past with do_sqlite3, which contained a
sqlite.dll
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 sqlite.so in your path somewhere?

– Yehuda