0

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

Krzysztof Luks
  • 290
  • 2
  • 8
  • I would encourage you to deploy your rails app onto v3 'native' instead of packing it up into a war file... You can find info about doing that in the hits returned by this search: http://www.google.com/search?q=glassfish+v3+deploy+rails+app – vkraemer Dec 18 '09 at 16:06
  • If you do install the war file, it has jruby.jar inside of the war, so you don't need to install all of that stuff on the server. – MattMcKnight Dec 18 '09 at 21:02

1 Answers1

3

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
  • 3,315
  • 20
  • 14