To continue the question: I'm not sure what the second option does, or why I might choose one over the other.
Response: In a nutshell, a gem is an application runner. It can run your Rails application but nothing else. If you use the Enterprise Server v3 Prelude installation, start the domain and deploy. You can deploy several Rails applications (or Java EE applications even) concurrently with a different context root. This gives you access to different containers such as web and EJB and also to the Update Tool. Enterprise Server enables you to host not only multiple Rails applications, but also any other Java EE application.
No, the gem only runs Rails applications with no extensions or extra features. You must have Enterprise Server v3 Prelude with a web container to access the Administration Console.
To continue the question: WAR files and exploded Java webapp directories have a WEB-INF/lib directory. Rails applications also have a lib directory, but this is for Ruby libraries. Where in a Rails application can I put application-specific jar files? Is there such a place, or must I place them in the domain/lib directory?
Response: Place them in the domain/lib directory, or in glassfish/lib. If those bundles are OSGi bundles, you should place them in the glassfish/modules directory. If you want to package your own set of jar files with the Rails application, instead of copying the jars in the glassfish/lib or glassfish/modules directory, you might want to use Warbler. The Warbler gem lets you package your own jars and creates a WAR file from your Rails applications.
See the following:
Related documentation: Getting Started With JRuby on Rails for Sun GlassFish Enterprise Server v3 Prelude
Blog post: “New and Improved GlassFish Gem” (http://weblogs.java.net/blog/vivekp/archive/2008/11/new_and_improve_1.html)
Getting Started Guide: http://wiki.glassfish.java.net/Wiki.jsp?page=GettingStartedGuide
Gem documentation: http://glassfishgem.rubyforge.org
Warbler information: http://caldersphere.rubyforge.org/warbler/
Related screencasts: http://wiki.glassfish.java.net/Wiki.jsp?page=Screencasts
JRuby applications can be deployed natively, without the use of the servlet container. Enterprise Server v3 Prelude can run JRuby applications directly on top of the servlet container. Warbler can also be used to deploy JRuby applications to the servlet container.
For screencasts related to JRuby and Enterprise Server, see the GlassFish screencasts page at http://wiki.glassfish.java.net/Wiki.jsp?page=Screencasts. Also see Getting Started With JRuby on Rails for Sun GlassFish Enterprise Server v3 Prelude.