Yesterday, I attempted to deploy a Rails application that used
ActiveScaffold (hereafter referred to as AS) with Warbler into a JEE
container.
I ran into a few issues that have to do with the fact that AS and
another plugin that are assuming a standard Rails application structure.
All of the required files appear to be in the deployed app, under /
instead of /public of course.
But for example, in the AS CSS, there are relative references like this:
background: url(…/…/…/images/active_scaffold/default/cross.png) 0 0
no-repeat;
which definitely do not resolve correctly in the deployed app.
Also, both AS and another plugin have install.rb code that assumes the
presence of the /public directory. In the case of AS, I had to include
“public” in the config.dirs directive just to get the app. to start
because it was running this AS code to copy to a directory named
“public”.
In general, it appears that when Warbler is combined with plugins that
hardcode the “public” in certain file access code (or even just assume
it per the CSS example above), that some static files will not be able
to be accessed due to the forced relocation of the contents of “public”
to “/” in the deployed app.
In the AS case, there are some workarounds involving the
Rails.public_path variable and then a patch that takes advantage of
that.
But it appears that this will always be an issue. Whenever one pulls in
a plugin, one needs to evaluate whether it is assuming the standard
Rails directory structure and then if the plugin does so assume, patch
appropriately so that it will work in Warbler.
I can’t see a way around this.
Any thoughts?
Wes
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email