At 11:10 AM -0500 3/19/08, Nick Sieger wrote:
>On Tue, Mar 18, 2008 at 10:44 PM, Stephen Bannasch
><[EMAIL PROTECTED]> wrote:
>> I have a very simple test Rails app here:
>>
>>     https://svn.concord.org/svn/projects/trunk/common/rails/blog
>>
>>  The code is also visible in trac here:
>>
>>    http://trac.cosmos.concord.org/projects/browser/trunk/common/rails/blog
>>
>>  It works fine in Mongrel but I can't seem to get database access
>>  working when I create a WAR with Warble and deploy it with JRuby-Rack
>>  to Tomcat.
>>
>>  I am using JRuby trunk r6268, trunk JRuby-Rack, warbler (0.9.4), and
>>  activerecord-jdbc-adapter and activerecord-jdbch2-adapter v0.8
>
>I don't have enough familiarity with H2 to know why this is happening,
>but there were some posts related to H2 recently that suggested you
>connect to it through JNDI when running in the appserver. Have you
>tried that?

Nick -- the problem appears to be related to the current working directory when 
the jdbc url is resolved.

If I change the config/database.yml so that an complete path is specified to 
the database then H2 works in Tomcat.  Here's an example or a 
config/database.yml that works:

development:
  adapter: jdbch2
  database: <%= RAILS_ROOT %>/db/sds_h2_database

production:
  adapter: jdbch2
  database: <%= RAILS_ROOT %>/db/sds_h2_database

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to