Hey Folks,
I’ve been playing with Rails3 (3.0.0.beta4) and warbler… deploying to
WebSphere 7. I’ve managed to get my app ported over to rails3 and
packaged into a .war file… it even deploys to WebSphere fine, starts,
and appears to run great! However… assets do not get served properly.
I’m using:
rails 3.0.0.beta4
jruby-rack 1.0.1
warbler 1.1.0
jruby 1.5.0
To boil it down, this is easily reproducible with a bare bones rails3
app and warbler. No need to add any controllers or generate anything.
Simply create a new app, warbler it*, and deploy to WebSphere with a
context root of anything except /. Browsing to the app’s root, which
should render public/index.html, fails with:
ActionController::RoutingError (No route matches “/”)
The same procedure works fine with Rails 2.3.8.
I suspect the context root I am deploying to in WebSphere is not mapping
correctly with rails3. Public stuff should be served before routing even
gets involved right?
Also, image_tag (and friends) do not generate a URL with the context
root prefixed, which I am guessing is bad, but a good clue What I am
guessing should be populated with the prefix,
controller.config.relative_url_root, is empty, but
ENV[“RAILS_RELATIVE_URL_ROOT”] does have the prefix in it. Seems like a
mismatch to me… however, I’m a bit confused by the rails3 changes with
respect to relative_url_root, so I’m not sure what is correct anymore…
What I can say is that compute_public_path in actionpack’s
asset_tag_helper.rb uses controller.config.relative_url_root vs
ENV[“RAILS_RELATIVE_URL_ROOT”] so it is not surprising image_tag is
wrong. I can fix compute_public_path, but the routing issue still
remains, so I suspect there is a deeper root cause here.
Anyone have ideas?
- Note: I am using a custom web.xml as WebSphere doesn’t like the
default one generated by warble. Can post if necessary.
Thanks!
- nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email