Question

I've created a simple 'hello' type JRuby application and use Warbler to WAR up and then deploy to JBoss. However, I get the following error when using the application:

ActiveRecord::JDBCError (The driver encountered an unknown error: java.sql.SQLException: path to '/opt/jboss/server/ruby/tmp/deploy/tmp8791905909469840942demo-exp.war/WEB-INF/db/production.sqlite3': '/opt/jboss/server/ruby/tmp/deploy/tmp8791905909469840942demo-exp.war/WEB-INF/db' does not exist):

Sure enough when I dig into the demo.war file the db directory is missing from WEB-INF directory. The db directory exists in the app directory though along with test, development and production database files.

Any ideas?

Was it helpful?

Solution

Usually the db directory contains migrations only. If you're using sqlite3 it contains the database file, but since when you deploy a war in production it gets unpacked somewhere in the server innards and potentially gets deleted on redeploy, your database file would go away with the redeploy. If the file is read-only and you're not worried about that consideration then you can easily add the db directory by running warble config and editing config/warble.rb and adding db to the config.dirs array.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top