Jon Tirsen wrote:
Anyway to get the preparser to use paths relative to __FILE__ rather
than absolute?
Interestingly it works for the JRuby code that's preparsed, so I
wondered if it needed to be called in a different way.
Currently we're calling ASTSerializer.serialize(File source, File dest).
After it failed, I assumed that the files needed to be constructed
taking the include path into account (e.g. new File(include path,
relative file)).
I can probably have a crack at this one as well. I've been looking a
bit at Rake's FileSet which does 90% of the heavy lifting. (A lazy
programmer is a good programmer.) I'll try to integrate it and add a
"include_files"/"exclude_files" directive to war.rb along the lines of:
include_files 'app/**'
include_files 'vendor/plugins/**'
exclude_files 'vendor/plugins/javascript_test/**'
exclude_files 'tmp/**'
Thoughts?
Sounds good.
Currently there is a list of exclude and includes, however it's hard
coded, being able to add extra ones in would certainly be useful.
packer.rb:
webapp_files = Rake::FileList.new(File.join('**', '*'))
webapp_files.exclude(staging)
webapp_files.exclude('*.war')
webapp_files.exclude(config.local_java_lib)
webapp_files.exclude(File.join('public', '.ht*'))
webapp_files.exclude(File.join('public', 'dispatch*'))
webapp_files.exclude(File.join('log', '*.log'))
webapp_files.exclude(File.join('tmp', 'cache', '*'))
webapp_files.exclude(File.join('tmp', 'sessions', '*'))
webapp_files.exclude(File.join('tmp', 'sockets', '*'))
webapp_files.exclude(File.join('tmp', 'jetty'))
7) can't convert Regexp into #<Class:01xbab7b2>
Would it be possible to trace this in a Java debugger to see where
it's
being thrown from?
Are there any unusual routes defined?
The stack trace was in my original email. What else could I gather
from a Java debugger? Yes we do have a good share of routes but we're
not using any esoteric features of routing.
My guess is that this is a JRuby bug as the "Regexp it can't convert
to #<Class:01xbab7b2>" is actually a regexp defined in the cgi.rb
file. And why would it want to convert this into a singleton class?
It kinda feels a bit like the good old Weblogic class loader problem
back in 2001: "Can't cast com.xyz.Xyz to com.xyz.Xyz". If people
remember. :-)
I did a grep through JRuby to try and find where the error message was
coming from after gsub is called, and the only potential place I could
find is RubyObject.convertToType.
However, I'm not sure how it gets from gsub to convertToType.
Cheers,
Robert
_______________________________________________
Jruby-extras-devel mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel