Is there a default folder where WEBrick will search for jars when running JRuby on Rails in it? (something like the lib folder in Tomcat?)
Now I need to require all jars if running in WEBrick. In Tomcat I don’t need to do this (I just need to put all my jars in the WEB-INF\lib folder).
there’s no such thing to my knowledge with WEBrick – it’s basically the very same ruby code with JRuby as it is with MRI …
you seem to be ready for using Trinidad – it’s similar to ruby servers such as WEBrick (startable from the CLI:
cd myRailsApp; trinidad) but is actually a wrapped Tomcat.put the jars into say myRailsApp/lib/java and run with
trinidad --jars lib/javayou can configure this with
config/trinidad.ymlso that you do not have to pass it every time.I think it defaults to
--lib libthus putting jars directly into lib folder should work by default …as for the WEBrick, you can make an “auto-loaded” jar directory yourself, say you put your jars into myRailsApp/lib/java and then load them in an initializer, with something like :