views:

177

answers:

1

I'm trying to deploy simple Rails app on glassfish v3 and get the following error:

org.jruby.rack.RackInitializationException: Could not find RubyGem activerecord-jdbc-adapter (>= 0)

Environment details: App is packaged as war using warbler. JRuby 1.4.0 installed locally, with activerecord-jdbc-adapter gem installed. App is configured to use derby database (migration is successful):

development:
      host: localhost
      adapter: jdbc
      driver: org.apache.derby.jdbc.ClientDriver
      url: jdbc:derby://localhost:1527/railsdb
      username: rails
      password: rails

System: Mac OS 10.6.2

+3  A: 

Usually you need to tell Warbler to include the gem in the war file. You can do this by either adding the gem to your config/environment.rb as follows:

config.gem "activerecord-jdbc-adapter", :lib => false

Or by ensuring you have a Warbler configuration file ('warble config') and adding the following entry:

config.gems << "activerecord-jdbc-adapter"
Nick Sieger
Nick wrote warbler, so I would trust his answer if I were you...
MattMcKnight