Logs for the RingoJS IRC channel, as logged by ringostarr.

2010-10-19

[00:01] <earl> botic: you're welcome :) and i think your most recent commit is a very good catch

[00:02] <earl> tschaub: could you try setting ringo-home to webapp/mywebapp/WEB-INF ?

[00:02] <tschaub> just did

[00:02] <tschaub> I get an exception if it doesn't start with /

[00:02] <tschaub> and If I set it to /webapps/mywebapp/WEB-INF then I get java.io.FileNotFoundException: File '/Users/tschaub/opt/apache-tomcat-7.0.2/app' does not exist.

[00:03] <tschaub> which seems like it's a step in the wrong direction

[00:05] <earl> ok, then leave ringo-home at /WEB-INF and try the module-path instead :)

[00:05] <earl> webapps/mywebapp/WEB-INF/app

[00:08] <tschaub> earl: interestingly, same thing

[00:09] <tschaub> require("fs").workingDirectory() -> /Users/tschaub/opt/apache-tomcat-7.0.2/

[00:09] <earl> that's fine

[00:09] <earl> what about module.resolve() though?

[00:09] <tschaub> returns whatever I provide

[00:09] <tschaub> module.resolve("foo") -> "foo"

[00:10] <tschaub> which looks to occur when repository is null in ModuleMetaObject

[00:10] <tschaub> or repository.getResource(path) is null

[00:11] <earl> and getRepository('./foo') presumably still returns tomcat/foo

[00:11] <tschaub> well, actually - maybe that's not happening

[00:11] <tschaub> yes, that is what it returns

[00:11] <tschaub> so module.resolve("./foo") returns "foo"

[00:11] <tschaub> which implies that res.getRelativePath() is getting called

[00:12] <tschaub> sorry, responding to myself and you - getRepository("./foo") returns a FileRepository with /path/to/tomcat/foo

[00:12] <earl> mhm

[00:14] <earl> ah yes, ringo-home is relative to the servlet context

[00:15] <earl> that's why /WEB-INF is fine

[00:15] <tschaub> ok, that makes sense

[00:15] <tschaub> I'll try the same in jetty just for kicks

[00:15] <earl> and the module-path is relative to ringo-home

[00:17] <tschaub> yeah, same behavior

[00:17] <tschaub> (in Jetty)

[00:26] <earl> ah

[00:26] <earl> crap :)

[00:26] <earl> what do you get for getResource('./foo')?

[00:27] <tschaub> earl: Resource "./foo"

[00:27] <earl> that you get a FileRepository is mildly strange, because i think you actually should get a WebappRepository

[00:28] <tschaub> sounds reasonable

[00:28] <earl> well, unfortunately i don't have enough time at the moment to look deeper into this

[00:28] <tschaub> thanks a lot earl

[00:28] <tschaub> I appreciate the time

[00:29] <tschaub> I'm moving on for now

[00:29] <earl> maybe post a quick message to the mailing list, to see if someone who successfully deployed on tomcat can help

[00:29] <tschaub> just did

[00:29] <earl> otherwise i'll find some time over the next few days to inspect tomcat deployment in more detail

[00:30] <earl> ok, great :)

[00:31] <earl> until then, it's probably easier to just serve your static stuff via tomcat directly :)

[01:06] <mcepl> could somebody help me with E4X? If I have http://gitorious.org/coelodonta/coelodonta/blobs/master/blogger-test/test-entry.atom as XML object in entry variable will

[01:06] <mcepl> for each (var element in entry.atomNS::*) {

[01:06] <mcepl> ...

[01:06] <mcepl> }

[01:06] <mcepl> go through one-level-depth elements?