Showing posts with label jetty. Show all posts
Showing posts with label jetty. Show all posts

Friday, July 13, 2007

JRuby Goldspike in Context Root

If you're using JRuby's Goldspike plugin to create a WAR for deployment, you might discover that rake war:standalone:run puts the application into a named context (e.g. http://localhost:8080/myapplication). Since most Ruby applications run at the root, this might disrupt your application if it wasn't built to handle a changing path (or your remote tests, which might have the same problem).

Fortunately, it's very easy to modify Goldspike to use the root:

  1. Open vendor/plugins/goldspike/lib/run.rb
  2. Find the WebAppContext definition
  3. Adjust the second argument from
    <Arg>/<%= config.name %></Arg>
    to:
    <Arg>/</Arg>
You're done. When Jetty boots up, you'll see something like "NO JSP Support for /, did not ...". The "/" is the context, so you're in good shape.