From Ashish.Sahni at Sun.COM Thu Feb 1 19:38:00 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Thu, 01 Feb 2007 16:38:00 -0800 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <4556DF3F.9040403@cs.auckland.ac.nz> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> Message-ID: <45C287E8.3060906@sun.com> Hi Folks, With the current rails-integration+JRuby deployed as a war file on Tomcat or GlassFish I see some issues (a couple of them #7135, 7136). So in the interim I decided to use the 'dispatch.cgi' route without exec'ing another process - this cgi route btw does not encounter any of the errors. Of course this required some code modifications. There is an issue with this technique as in the cgi-mode the rails app never closes stdout, the stream reader never sees EOS so there is a workaround I put in place, which is to timeout after a small period which works well. The important question I have is - I'd like to add this functionality so that the rails-integration library can provide the cgi-route as an option(configurable via web.xml) ? Any other ideas or suggestions regarding making the cgi or the default route in the war file work ? Thanks -- Ashish http://blogs.sun.com/whacko From charles.nutter at sun.com Fri Feb 2 03:40:24 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Fri, 02 Feb 2007 02:40:24 -0600 Subject: [Jruby-extras-devel] Adding tests for AR-JDBC In-Reply-To: References: <000001c74437$1c432140$6601a8c0@pkcshuttle> <45BFA7FE.3000203@sun.com> Message-ID: <45C2F8F8.6040206@sun.com> Ryan Bell wrote: > Latest from trunk. Well, latest as of last night... I found this today; it bit me too running Rails tests. It was related to some changes to RubyKernel. See bug JRUBY-466. I reverted the changes for now, which causes a couple small failures in the regular test suite, but it allows Rake to work. - Charlie From ryan.l.bell at gmail.com Fri Feb 2 07:36:56 2007 From: ryan.l.bell at gmail.com (Ryan Bell) Date: Fri, 2 Feb 2007 07:36:56 -0500 Subject: [Jruby-extras-devel] Adding tests for AR-JDBC In-Reply-To: <45C2F8F8.6040206@sun.com> References: <000001c74437$1c432140$6601a8c0@pkcshuttle> <45BFA7FE.3000203@sun.com> <45C2F8F8.6040206@sun.com> Message-ID: Yipee! On 2/2/07, Charles Oliver Nutter wrote: > > Ryan Bell wrote: > > Latest from trunk. Well, latest as of last night... > > I found this today; it bit me too running Rails tests. It was related to > some changes to RubyKernel. See bug JRUBY-466. I reverted the changes > for now, which causes a couple small failures in the regular test suite, > but it allows Rake to work. > > - Charlie > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ryan L. Bell http://kofno.wordpress.com http://kofno.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070202/60ba5b85/attachment.html From ola.bini at ki.se Sat Feb 3 05:29:36 2007 From: ola.bini at ki.se (Ola Bini) Date: Sat, 03 Feb 2007 11:29:36 +0100 Subject: [Jruby-extras-devel] Ragel, Mongrel and Hpricot Message-ID: <45C46410.605@ki.se> Hi guys. I'm feeling the pain of JRuby+WEBrick. I want Mongrel. So, how does the situation look for this, at the moment? I have some recollection of Ragel being available for Java nowadays, but can't find any mention of this on the Ragel homepage. There is another reason for my interest in Ragel, and that is Hpricot. I would love to be able to use that from JRuby, and the only hard part is the C extension (hpricot_scan) which is a ragel parser. Regards -- Ola Bini (http://ola-bini.blogspot.com) JvYAML, RbYAML, JRuby and Jatha contributor System Developer, Karolinska Institutet (http://www.ki.se) OLogix Consulting (http://www.ologix.com) "Yields falsehood when quined" yields falsehood when quined. From fausto.lelli at gmail.com Sun Feb 4 03:52:11 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Sun, 4 Feb 2007 09:52:11 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45C287E8.3060906@sun.com> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> Message-ID: Hi Ashish, > see some issues (a couple of them #7135, 7136). So in the interim I I did run into this issues at first too, and if I remember well, I all went away went I enabled the browser cache, don't ask me why though ! Anyway, during these past days we've been working on a way to configure the rails-integration, which is now realized as an yml file. I do think though, if Robert agrees, that the yml file would be more conveniently replaced by a pure ruby config file, as more and more options could come along. I'll start the work once (and if) Robert agrees. Cheers, Fausto On 2/2/07, Ashish Sahni wrote: > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From fausto.lelli at gmail.com Sun Feb 4 07:06:57 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Sun, 4 Feb 2007 13:06:57 +0100 Subject: [Jruby-extras-devel] Ragel, Mongrel and Hpricot In-Reply-To: <45C46410.605@ki.se> References: <45C46410.605@ki.se> Message-ID: Hi Ola, I would like to ask, do you think that Mongrel is a better alternative to deployment to standard java servlet container, like Tomcat, which possibile right now, apart from some glitches that will be ironed out in the near future ? F. On 2/3/07, Ola Bini wrote: > Hi guys. > > I'm feeling the pain of JRuby+WEBrick. I want Mongrel. So, how does the > situation look for this, at the moment? > > I have some recollection of Ragel being available for Java nowadays, but > can't find any mention of this on the Ragel homepage. > > There is another reason for my interest in Ragel, and that is Hpricot. I > would love to be able to use that from JRuby, and the only hard part is > the C extension (hpricot_scan) which is a ragel parser. > > Regards > -- > Ola Bini (http://ola-bini.blogspot.com) > JvYAML, RbYAML, JRuby and Jatha contributor > System Developer, Karolinska Institutet (http://www.ki.se) > OLogix Consulting (http://www.ologix.com) > > "Yields falsehood when quined" yields falsehood when quined. > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From robert at cs.auckland.ac.nz Sun Feb 4 15:27:14 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Mon, 05 Feb 2007 09:27:14 +1300 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> Message-ID: <45C641A2.90800@cs.auckland.ac.nz> Hi Fausto, That sounds like a good idea. Cheers, Robert Fausto Lelli wrote: > Hi Ashish, > > >> see some issues (a couple of them #7135, 7136). So in the interim I >> > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > >> Hi Folks, >> >> With the current rails-integration+JRuby deployed as a war file on >> Tomcat or GlassFish I >> see some issues (a couple of them #7135, 7136). So in the interim I >> decided to use the 'dispatch.cgi' route without >> exec'ing another process - this cgi route btw does not encounter any of >> the errors. >> >> Of course this required some code modifications. There is an issue with >> this technique as in the >> cgi-mode the rails app never closes stdout, the stream reader never >> sees EOS >> so there is a workaround I put in place, which is to timeout after a >> small period which works well. >> >> The important question I have is - I'd like to add this functionality so >> that the rails-integration library can >> provide the cgi-route as an option(configurable via web.xml) ? >> Any other ideas or suggestions regarding making the cgi or the default >> route in the war file work ? >> >> Thanks >> >> -- >> Ashish >> http://blogs.sun.com/whacko >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/1c6c38e9/attachment.html From fausto.lelli at gmail.com Sun Feb 4 17:59:51 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Sun, 4 Feb 2007 23:59:51 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45C641A2.90800@cs.auckland.ac.nz> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45C641A2.90800@cs.auckland.ac.nz> Message-ID: Ok then. by the way Robert, I"trying the new jruby trunk with rails 1.2.1 and I now see two issues with the dispatcher, one is that the prepare_application throws and exception, the other one is that the ActionController::Routes::Route.recognize! has been renamed to recognize, and the new one fails in some "cleanup" phase. Do you have any ideas about that ? Cheers, Fausto On 2/4/07, Robert Egglestone wrote: > > Hi Fausto, > That sounds like a good idea. > Cheers, Robert > > > Fausto Lelli wrote: > Hi Ashish, > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think > though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > > > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > From robert at cs.auckland.ac.nz Sun Feb 4 18:16:23 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Mon, 05 Feb 2007 12:16:23 +1300 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45C641A2.90800@cs.auckland.ac.nz> Message-ID: <45C66947.2030807@cs.auckland.ac.nz> I've seen an exception during initialization relating to IRB.start. (I couldn't see the message until adding some extra error handling code) To work around this, I commented out this line in development.rb: config.breakpoint_server = true I haven't seen the other exceptions yet, however we'll need to make some changes to the dispatcher to get it working with 1.2.1. Cheers, Robert Fausto Lelli wrote: > Ok then. > > by the way Robert, I"trying the new jruby trunk with rails 1.2.1 > and I now see two issues with the dispatcher, one is that the > prepare_application throws and exception, the other one is > that the ActionController::Routes::Route.recognize! has been > renamed to recognize, and the new one fails in some "cleanup" > phase. Do you have any ideas about that ? > > Cheers, > Fausto > > On 2/4/07, Robert Egglestone wrote: > >> Hi Fausto, >> That sounds like a good idea. >> Cheers, Robert >> >> >> Fausto Lelli wrote: >> Hi Ashish, >> >> >> >> see some issues (a couple of them #7135, 7136). So in the interim I >> >> I did run into this issues at first too, and if I remember well, I all went >> away went I enabled the browser cache, don't ask me why though ! >> >> Anyway, during these past days we've been working on a way to configure >> the rails-integration, which is now realized as an yml file. I do think >> though, >> if Robert agrees, that the yml file would be more conveniently replaced by >> a pure ruby config file, as more and more options could come along. >> >> I'll start the work once (and if) Robert agrees. >> >> Cheers, >> Fausto >> >> On 2/2/07, Ashish Sahni wrote: >> >> >> Hi Folks, >> >> With the current rails-integration+JRuby deployed as a war file on >> Tomcat or GlassFish I >> see some issues (a couple of them #7135, 7136). So in the interim I >> decided to use the 'dispatch.cgi' route without >> exec'ing another process - this cgi route btw does not encounter any of >> the errors. >> >> Of course this required some code modifications. There is an issue with >> this technique as in the >> cgi-mode the rails app never closes stdout, the stream reader never >> sees EOS >> so there is a workaround I put in place, which is to timeout after a >> small period which works well. >> >> The important question I have is - I'd like to add this functionality so >> that the rails-integration library can >> provide the cgi-route as an option(configurable via web.xml) ? >> Any other ideas or suggestions regarding making the cgi or the default >> route in the war file work ? >> >> Thanks >> >> -- >> Ashish >> http://blogs.sun.com/whacko >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/3a0d952e/attachment.html From fausto.lelli at gmail.com Sun Feb 4 18:32:35 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Mon, 5 Feb 2007 00:32:35 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45C66947.2030807@cs.auckland.ac.nz> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45C641A2.90800@cs.auckland.ac.nz> <45C66947.2030807@cs.auckland.ac.nz> Message-ID: I did see that too, if I recall correctly I commended the breakpoint calling too. Now this seems to be fixed this jruby trunk and 1.2.1 > I haven't seen the other exceptions yet, however we'll need to make some > changes to the dispatcher to get it working with 1.2.1. yes, a resolution of the problem is a little beyond me, any help or direction you can throw in my way is harmly welcome. Did you see the work of the jruby trunk compiler lately ? I was able to create the ast.ser of both the dispatcher.rb and the process.rb, really cool. I did try to compile to bytecode but that's no ready yet .... that would be too much :) Hope to year you soon Cheers, Fausto On 2/5/07, Robert Egglestone wrote: > > I've seen an exception during initialization relating to IRB.start. (I > couldn't see the message until adding some extra error handling code) > To work around this, I commented out this line in development.rb: > config.breakpoint_server = true > > I haven't seen the other exceptions yet, however we'll need to make some > changes to the dispatcher to get it working with 1.2.1. > > > Cheers, > Robert > > > Fausto Lelli wrote: > Ok then. > > by the way Robert, I"trying the new jruby trunk with rails 1.2.1 > and I now see two issues with the dispatcher, one is that the > prepare_application throws and exception, the other one is > that the ActionController::Routes::Route.recognize! has been > renamed to recognize, and the new one fails in some "cleanup" > phase. Do you have any ideas about that ? > > Cheers, > Fausto > > On 2/4/07, Robert Egglestone wrote: > > > Hi Fausto, > That sounds like a good idea. > Cheers, Robert > > > Fausto Lelli wrote: > Hi Ashish, > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think > though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > > > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > From fausto.lelli at gmail.com Sun Feb 4 18:33:39 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Mon, 5 Feb 2007 00:33:39 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45C641A2.90800@cs.auckland.ac.nz> <45C66947.2030807@cs.auckland.ac.nz> Message-ID: I did mean "warmly welcome" boy I can't even spell tonite :) On 2/5/07, Fausto Lelli wrote: > I did see that too, > if I recall correctly I commended the breakpoint calling too. Now this > seems to be fixed this jruby trunk and 1.2.1 > > > I haven't seen the other exceptions yet, however we'll need to make some > > changes to the dispatcher to get it working with 1.2.1. > yes, a resolution of the problem is a little beyond me, any help or > direction you can throw in my way is harmly welcome. > > Did you see the work of the jruby trunk compiler lately ? I was > able to create the ast.ser of both the dispatcher.rb and the > process.rb, really cool. I did try to compile to bytecode but that's > no ready yet .... that would be too much :) > > Hope to year you soon > > Cheers, > Fausto > On 2/5/07, Robert Egglestone wrote: > > > > I've seen an exception during initialization relating to IRB.start. (I > > couldn't see the message until adding some extra error handling code) > > To work around this, I commented out this line in development.rb: > > config.breakpoint_server = true > > > > I haven't seen the other exceptions yet, however we'll need to make some > > changes to the dispatcher to get it working with 1.2.1. > > > > > > Cheers, > > Robert > > > > > > Fausto Lelli wrote: > > Ok then. > > > > by the way Robert, I"trying the new jruby trunk with rails 1.2.1 > > and I now see two issues with the dispatcher, one is that the > > prepare_application throws and exception, the other one is > > that the ActionController::Routes::Route.recognize! has been > > renamed to recognize, and the new one fails in some "cleanup" > > phase. Do you have any ideas about that ? > > > > Cheers, > > Fausto > > > > On 2/4/07, Robert Egglestone wrote: > > > > > > Hi Fausto, > > That sounds like a good idea. > > Cheers, Robert > > > > > > Fausto Lelli wrote: > > Hi Ashish, > > > > > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > > > I did run into this issues at first too, and if I remember well, I all went > > away went I enabled the browser cache, don't ask me why though ! > > > > Anyway, during these past days we've been working on a way to configure > > the rails-integration, which is now realized as an yml file. I do think > > though, > > if Robert agrees, that the yml file would be more conveniently replaced by > > a pure ruby config file, as more and more options could come along. > > > > I'll start the work once (and if) Robert agrees. > > > > Cheers, > > Fausto > > > > On 2/2/07, Ashish Sahni wrote: > > > > > > Hi Folks, > > > > With the current rails-integration+JRuby deployed as a war file on > > Tomcat or GlassFish I > > see some issues (a couple of them #7135, 7136). So in the interim I > > decided to use the 'dispatch.cgi' route without > > exec'ing another process - this cgi route btw does not encounter any of > > the errors. > > > > Of course this required some code modifications. There is an issue with > > this technique as in the > > cgi-mode the rails app never closes stdout, the stream reader never > > sees EOS > > so there is a workaround I put in place, which is to timeout after a > > small period which works well. > > > > The important question I have is - I'd like to add this functionality so > > that the rails-integration library can > > provide the cgi-route as an option(configurable via web.xml) ? > > Any other ideas or suggestions regarding making the cgi or the default > > route in the war file work ? > > > > Thanks > > > > -- > > Ashish > > http://blogs.sun.com/whacko > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > From clark at clarkrichey.com Sun Feb 4 18:07:30 2007 From: clark at clarkrichey.com (Clark D. Richey, Jr.) Date: Sun, 04 Feb 2007 18:07:30 -0500 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question Message-ID: <000a01c748b1$3f4dc0e0$bde942a0$@com> Sorry for the basic question but I'm a new developer to the project. I checked out the ActiveRecord-JDBC code from SVN but I am having problems getting the mysql tests to run. I setup a mysql db that matches the default settings. I'm sure that I'm missing something simple. Here is what I get when I try to use rake to run the mysql tests: C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby %JRUBY_HOME%/bin/rake test_mysql (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `require': No such file to load -- mo dels/entry (LoadError) from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4 from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `load' from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4 from :-1:in `each' from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:5 rake aborted! Command failed with status (1): [C:/jruby-0.9.2/bin/jruby.bat -Ilib;test "C...] Thanks for the help! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070204/daf9c929/attachment-0001.html From ryan.l.bell at gmail.com Sun Feb 4 23:26:22 2007 From: ryan.l.bell at gmail.com (Ryan Bell) Date: Sun, 4 Feb 2007 23:26:22 -0500 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question In-Reply-To: <000a01c748b1$3f4dc0e0$bde942a0$@com> References: <000a01c748b1$3f4dc0e0$bde942a0$@com> Message-ID: I'm not sure why, but it looks like the test directory isn't getting on the load path. On 2/4/07, Clark D. Richey, Jr. wrote: > > Sorry for the basic question but I'm a new developer to the project. I > checked out the ActiveRecord-JDBC code from SVN but I am having problems > getting the mysql tests to run. I setup a mysql db that matches the default > settings. I'm sure that I'm missing something simple. Here is what I get > when I try to use rake to run the mysql tests: > > > > C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby > %JRUBY_HOME%/bin/rake test_mysql > > (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) > > C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:4:in > `require': No such file to load -- mo > > dels/entry (LoadError) > > from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1 > /lib/rake/rake_test_loader.rb:4 > > from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:4:in > `load' > > from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1 > /lib/rake/rake_test_loader.rb:4 > > from :-1:in `each' > > from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1 > /lib/rake/rake_test_loader.rb:5 > > rake aborted! > > Command failed with status (1): [C:/jruby-0.9.2/bin/jruby.bat -Ilib;test > "C...] > > > > Thanks for the help! > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ryan L. Bell http://kofno.wordpress.com http://kofno.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070204/4b90f7c2/attachment.html From nicksieger at gmail.com Mon Feb 5 11:22:32 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Mon, 5 Feb 2007 10:22:32 -0600 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question In-Reply-To: References: <000a01c748b1$3f4dc0e0$bde942a0$@com> Message-ID: On 2/4/07, Ryan Bell wrote: > > I'm not sure why, but it looks like the test directory isn't getting on > the load path. > > On 2/4/07, Clark D. Richey, Jr. < clark at clarkrichey.com> wrote: > > > Sorry for the basic question but I'm a new developer to the project. I > > checked out the ActiveRecord-JDBC code from SVN but I am having problems > > getting the mysql tests to run. I setup a mysql db that matches the default > > settings. I'm sure that I'm missing something simple. Here is what I get > > when I try to use rake to run the mysql tests: > > > > > > > > C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby > > %JRUBY_HOME%/bin/rake test_mysql > > > > (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) > > > > C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:4:in > > `require': No such file to load -- mo > > > > dels/entry (LoadError) > > > Yeah, that is strange. Can you run rake again with --trace? I don't think it will tell much, but it can't hurt. Also, usually rake will print out the command line used to launch the tests. Can you include that? /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/994e6b44/attachment.html From charles.nutter at sun.com Mon Feb 5 17:16:31 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Mon, 05 Feb 2007 16:16:31 -0600 Subject: [Jruby-extras-devel] Ragel, Mongrel and Hpricot In-Reply-To: References: <45C46410.605@ki.se> Message-ID: <45C7ACBF.6060102@sun.com> Fausto Lelli wrote: > Hi Ola, > > I would like to ask, do you think that Mongrel is a better alternative to > deployment to standard java servlet container, like Tomcat, which possibile > right now, apart from some glitches that will be ironed out in the > near future ? You asked Ola, but here's my opinion: Ruby on Rails developers use Mongrel. They may start using Tomcat or Glassfish or what have you in the future, but they're using Mongrel today, and so we should support it. I think it's pretty likely we'll be able to thwomp Mongrel on speed later on, but it's probably the best, fastest, most stable way to run Rails anywhere right now. - Charlie From fausto.lelli at gmail.com Mon Feb 5 17:59:49 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Mon, 5 Feb 2007 23:59:49 +0100 Subject: [Jruby-extras-devel] Ragel, Mongrel and Hpricot In-Reply-To: <45C7ACBF.6060102@sun.com> References: <45C46410.605@ki.se> <45C7ACBF.6060102@sun.com> Message-ID: Hi, > later on, but it's probably the best, fastest, most stable way to run > Rails anywhere right now. no doubt. I was wondering if there is some tecnical reason to prefer one or the other in the long run. I'm totally ignorant of Mongrel btw. (my fault) Cheers, Fausto On 2/5/07, Charles Oliver Nutter wrote: > Fausto Lelli wrote: > > Hi Ola, > > > > I would like to ask, do you think that Mongrel is a better alternative to > > deployment to standard java servlet container, like Tomcat, which possibile > > right now, apart from some glitches that will be ironed out in the > > near future ? > > You asked Ola, but here's my opinion: Ruby on Rails developers use > Mongrel. They may start using Tomcat or Glassfish or what have you in > the future, but they're using Mongrel today, and so we should support it. > > I think it's pretty likely we'll be able to thwomp Mongrel on speed > later on, but it's probably the best, fastest, most stable way to run > Rails anywhere right now. > > - Charlie > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From clark at clarkrichey.com Mon Feb 5 19:46:59 2007 From: clark at clarkrichey.com (Clark D. Richey, Jr.) Date: Mon, 05 Feb 2007 19:46:59 -0500 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question In-Reply-To: References: <000a01c748b1$3f4dc0e0$bde942a0$@com> Message-ID: <003c01c74988$502b8dc0$f082a940$@com> Here is everything. I am running it from within the gems directory which is where I checked out to. I originally tried checking out to a completely different directory but had even less success with that approach. C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby %JRUBY_HOME%/bin/rake test_mysql --trace (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) ** Invoke test_mysql (first_time) ** Execute test_mysql C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `require': No such file to load -- mo dels/entry (LoadError) from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4 from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `load' from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4 from :-1:in `each' from C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:5 rake aborted! Command failed with status (1): [C:/jruby-0.9.2/bin/jruby.bat -Ilib;test "C...] C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:5:in `call' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:5:in `sh' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `sh' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:5:in `ruby' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:117:in `ruby' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:117:in `define' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:93:in `verbose' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:118:in `define' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:93:in `call' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:386:in `execute' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `each' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1905:in `synchronize' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:358:in `invoke' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1905:in `run' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7:in `each' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 C:\jruby-0.9.2/bin/rake:18:in `load' C:\jruby-0.9.2/bin/rake:18 From: jruby-extras-devel-bounces at rubyforge.org [mailto:jruby-extras-devel-bounces at rubyforge.org] On Behalf Of Nick Sieger Sent: Monday, February 05, 2007 11:23 AM To: jruby-extras-devel at rubyforge.org Subject: Re: [Jruby-extras-devel] ActiveRecord-JDBC newbie question On 2/4/07, Ryan Bell wrote: I'm not sure why, but it looks like the test directory isn't getting on the load path. On 2/4/07, Clark D. Richey, Jr. < clark at clarkrichey.com > wrote: Sorry for the basic question but I'm a new developer to the project. I checked out the ActiveRecord-JDBC code from SVN but I am having problems getting the mysql tests to run. I setup a mysql db that matches the default settings. I'm sure that I'm missing something simple. Here is what I get when I try to use rake to run the mysql tests: C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby %JRUBY_HOME%/bin/rake test_mysql (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `require': No such file to load -- mo dels/entry (LoadError) Yeah, that is strange. Can you run rake again with --trace? I don't think it will tell much, but it can't hurt. Also, usually rake will print out the command line used to launch the tests. Can you include that? /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/0a2b1c6e/attachment-0001.html From clark at clarkrichey.com Mon Feb 5 21:42:03 2007 From: clark at clarkrichey.com (Clark D. Richey, Jr.) Date: Mon, 05 Feb 2007 21:42:03 -0500 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question In-Reply-To: References: <000a01c748b1$3f4dc0e0$bde942a0$@com> Message-ID: <004701c74998$635e2780$2a1a7680$@com> Here is an extra bit of information. If I run mysql_simple_test.rb directly, not using rake, it is able to find the load path just fine. The problem only occurs when I use the rake task. From: jruby-extras-devel-bounces at rubyforge.org [mailto:jruby-extras-devel-bounces at rubyforge.org] On Behalf Of Nick Sieger Sent: Monday, February 05, 2007 11:23 AM To: jruby-extras-devel at rubyforge.org Subject: Re: [Jruby-extras-devel] ActiveRecord-JDBC newbie question On 2/4/07, Ryan Bell wrote: I'm not sure why, but it looks like the test directory isn't getting on the load path. On 2/4/07, Clark D. Richey, Jr. < clark at clarkrichey.com > wrote: Sorry for the basic question but I'm a new developer to the project. I checked out the ActiveRecord-JDBC code from SVN but I am having problems getting the mysql tests to run. I setup a mysql db that matches the default settings. I'm sure that I'm missing something simple. Here is what I get when I try to use rake to run the mysql tests: C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby %JRUBY_HOME%/bin/rake test_mysql (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.r b:4:in `require': No such file to load -- mo dels/entry (LoadError) Yeah, that is strange. Can you run rake again with --trace? I don't think it will tell much, but it can't hurt. Also, usually rake will print out the command line used to launch the tests. Can you include that? /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/b1ececf6/attachment.html From ryan.l.bell at gmail.com Mon Feb 5 21:54:14 2007 From: ryan.l.bell at gmail.com (Ryan Bell) Date: Mon, 5 Feb 2007 21:54:14 -0500 Subject: [Jruby-extras-devel] ActiveRecord-JDBC newbie question In-Reply-To: <004701c74998$635e2780$2a1a7680$@com> References: <000a01c748b1$3f4dc0e0$bde942a0$@com> <004701c74998$635e2780$2a1a7680$@com> Message-ID: You know, there was some flaky behavior in rake on jruby-0.9.2 and earlier. When rake launched a new instance of the jruby to run the tests, the load path didn't get set up correctly. I remember working around that by writing my rake file on an earlier project to just run the tests directly. So, I think you're either going to have to keep running the tests directly, or else make your own build of jruby from the JRuby trunk. On 2/5/07, Clark D. Richey, Jr. wrote: > > Here is an extra bit of information. If I run mysql_simple_test.rb > directly, not using rake, it is able to find the load path just fine. The > problem only occurs when I use the rake task. > > > > *From:* jruby-extras-devel-bounces at rubyforge.org [mailto: > jruby-extras-devel-bounces at rubyforge.org] *On Behalf Of *Nick Sieger > *Sent:* Monday, February 05, 2007 11:23 AM > *To:* jruby-extras-devel at rubyforge.org > *Subject:* Re: [Jruby-extras-devel] ActiveRecord-JDBC newbie question > > > > On 2/4/07, *Ryan Bell* wrote: > > I'm not sure why, but it looks like the test directory isn't getting on > the load path. > > On 2/4/07, *Clark D. Richey, Jr. *< clark at clarkrichey.com> wrote: > > Sorry for the basic question but I'm a new developer to the project. I > checked out the ActiveRecord-JDBC code from SVN but I am having problems > getting the mysql tests to run. I setup a mysql db that matches the default > settings. I'm sure that I'm missing something simple. Here is what I get > when I try to use rake to run the mysql tests: > > > > C:\jruby-0.9.2\lib\ruby\gems\1.8\gems\ActiveRecord-JDBC-0.2.2\test>jruby > %JRUBY_HOME%/bin/rake test_mysql > > (in C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.2.2) > > C:/jruby-0.9.2/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:4:in > `require': No such file to load -- mo > > dels/entry (LoadError) > > > Yeah, that is strange. Can you run rake again with --trace? I don't > think it will tell much, but it can't hurt. Also, usually rake will print > out the command line used to launch the tests. Can you include that? > > /Nick > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ryan L. Bell http://kofno.wordpress.com http://kofno.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070205/c400eb9b/attachment.html From Ashish.Sahni at Sun.COM Wed Feb 7 12:38:32 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Wed, 07 Feb 2007 09:38:32 -0800 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> Message-ID: <45CA0E98.8070003@sun.com> (resending - my original email didn't make it because of size limitations I suppose, let me know if you'd like to take a look at the stack trace and I'll send the relevant sections) Hi Fausto, Please see inline: Fausto Lelli wrote: >Hi Ashish, > > > >>see some issues (a couple of them #7135, 7136). So in the interim I >> >> >I did run into this issues at first too, and if I remember well, I all went >away went I enabled the browser cache, don't ask me why though ! > > > Hmmm ... With a jruby build a couple of days old and unmodified rails-integration code I'm not seeing any explicit errors(other than the seemingly harmless error in the log when config.breakpoint-server set to false) but I do see the following odd behaviour: 1. On the very *first* load of the webapp no output is returned to the browser. 2. After an edit/update operation is performed the db is updated correctly but the response on the browser is again a null (content-length: 0) This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to get to work at all. Attached is a stacktrace of a request in process in tomcat which eventually returns with internal server error. Browser cache is enabled(Firefox). What web server are you using ? And are things working flawlessly for you ? W.r.t to the EOS issue I referred to in my original email - Takai Naoto suggested the following: # in closing_output.rb module ActionController class CGIResponse alias :original_out :out def out(output = $stdout) original_out output output.close if output.respond_to :close end end end and calling 'require closing_output.rb' in the dispatch-cgi code Well, it should work, right ? but does not, any clues. I can post the code modifications I have for the cgi route if needed. Thanks Ashish >Anyway, during these past days we've been working on a way to configure >the rails-integration, which is now realized as an yml file. I do think though, >if Robert agrees, that the yml file would be more conveniently replaced by >a pure ruby config file, as more and more options could come along. > >I'll start the work once (and if) Robert agrees. > >Cheers, >Fausto > >On 2/2/07, Ashish Sahni wrote: > > >>Hi Folks, >> >>With the current rails-integration+JRuby deployed as a war file on >>Tomcat or GlassFish I >>see some issues (a couple of them #7135, 7136). So in the interim I >>decided to use the 'dispatch.cgi' route without >>exec'ing another process - this cgi route btw does not encounter any of >>the errors. >> >>Of course this required some code modifications. There is an issue with >>this technique as in the >>cgi-mode the rails app never closes stdout, the stream reader never >>sees EOS >>so there is a workaround I put in place, which is to timeout after a >>small period which works well. >> >>The important question I have is - I'd like to add this functionality so >>that the rails-integration library can >>provide the cgi-route as an option(configurable via web.xml) ? >>Any other ideas or suggestions regarding making the cgi or the default >>route in the war file work ? >> >>Thanks >> >>-- >>Ashish >>http://blogs.sun.com/whacko >> >>_______________________________________________ >>Jruby-extras-devel mailing list >>Jruby-extras-devel at rubyforge.org >>http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> >_______________________________________________ >Jruby-extras-devel mailing list >Jruby-extras-devel at rubyforge.org >http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/5a8645c7/attachment.html From fausto.lelli at gmail.com Wed Feb 7 13:54:48 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Wed, 7 Feb 2007 19:54:48 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45CA0E98.8070003@sun.com> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> Message-ID: Hi Ashish in jruby-extras/trunk/rails-integration/examples there is a sample weapps "scaffold" that used to work. I used java 5 tomcat 5.0.28 jruby 0.9.1 rails 1.1.6 could you try it out and see if it works? >So in the interim I >decided to use the 'dispatch.cgi' route without >exec'ing another process - this cgi route btw does not encounter any of >the errors. could you elaborate a bit about it ? i didn't get it :( F. On 2/7/07, Ashish Sahni wrote: > > > (resending - my original email didn't make it because of size limitations I > suppose, > let me know if you'd like to take a look at the stack trace and I'll send > the relevant sections) > > Hi Fausto, > Please see inline: > > Fausto Lelli wrote: > Hi Ashish, > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > > Hmmm ... With a jruby build a couple of days old and unmodified > rails-integration code > I'm not seeing any explicit errors(other than the seemingly harmless error > in the log when > config.breakpoint-server set to false) but I do see the following odd > behaviour: > > 1. On the very *first* load of the webapp no output is returned to the > browser. > 2. After an edit/update operation is performed the db is updated correctly > but > the response on the browser is again a null (content-length: 0) > > This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to > get to work at all. > Attached is a stacktrace of a request in process in tomcat which eventually > returns > with internal server error. > > Browser cache is enabled(Firefox). > What web server are you using ? And are things working flawlessly for you ? > > W.r.t to the EOS issue I referred to in my original email - Takai Naoto > suggested the following: > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > > and calling 'require closing_output.rb' in the dispatch-cgi code > > Well, it should work, right ? but does not, any clues. I can post the code > modifications I have > for the cgi route if needed. > > Thanks > Ashish > > > > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think > though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > > > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From Ashish.Sahni at Sun.COM Wed Feb 7 17:29:30 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Wed, 07 Feb 2007 14:29:30 -0800 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> Message-ID: <45CA52CA.4080705@sun.com> Fausto Lelli wrote: >Hi Ashish > >in jruby-extras/trunk/rails-integration/examples there is a sample >weapps "scaffold" that used to work. I used >java 5 >tomcat 5.0.28 >jruby 0.9.1 >rails 1.1.6 > >could you try it out and see if it works? > > I can give it a try but I seem to be falling at the first hurdle Get errors along the lines ---------- 1) jline:jline:jar:0.9.91-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=jline -DartifactId=jline \ -Dversion=0.9.91-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.jruby.extras.rails-integration.samples:scaffoldtest:war:1.0-SNAPSHOT 2) jline:jline:jar:0.9.91-SNAPSHOT ---------- Since maven is cryptic and I don't want to manually download the files which already do exist in the jruby dir - what's going on here ? > > >>So in the interim I >>decided to use the 'dispatch.cgi' route without >>exec'ing another process - this cgi route btw does not encounter any of >>the errors. >> >> > >could you elaborate a bit about it ? i didn't get it :( > > Sorry for being vague. Since the current dispatch route in rails integration was not fully functional for me I tried to go the cgi route. see attached dispatch-me.cgi and the goCgiRoute method in RailsServlet.java This almost works but the EOS is still not seen by the stream reading code in RailsServlet. Any ideas ? Thanks Ashish >F. > >On 2/7/07, Ashish Sahni wrote: > > >>(resending - my original email didn't make it because of size limitations I >>suppose, >> let me know if you'd like to take a look at the stack trace and I'll send >>the relevant sections) >> >> Hi Fausto, >> Please see inline: >> >> Fausto Lelli wrote: >> Hi Ashish, >> >> >> >> see some issues (a couple of them #7135, 7136). So in the interim I >> >> I did run into this issues at first too, and if I remember well, I all went >>away went I enabled the browser cache, don't ask me why though ! >> >> >> Hmmm ... With a jruby build a couple of days old and unmodified >>rails-integration code >> I'm not seeing any explicit errors(other than the seemingly harmless error >>in the log when >> config.breakpoint-server set to false) but I do see the following odd >>behaviour: >> >> 1. On the very *first* load of the webapp no output is returned to the >>browser. >> 2. After an edit/update operation is performed the db is updated correctly >>but >> the response on the browser is again a null (content-length: 0) >> >> This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to >>get to work at all. >> Attached is a stacktrace of a request in process in tomcat which eventually >>returns >> with internal server error. >> >> Browser cache is enabled(Firefox). >> What web server are you using ? And are things working flawlessly for you ? >> >> W.r.t to the EOS issue I referred to in my original email - Takai Naoto >>suggested the following: >> >> # in closing_output.rb >> module ActionController >> class CGIResponse >> alias :original_out :out >> def out(output = $stdout) >> original_out output >> output.close if output.respond_to :close >> end >> end >> end >> >> and calling 'require closing_output.rb' in the dispatch-cgi code >> >> Well, it should work, right ? but does not, any clues. I can post the code >>modifications I have >> for the cgi route if needed. >> >> Thanks >> Ashish >> >> >> >> >> Anyway, during these past days we've been working on a way to configure >>the rails-integration, which is now realized as an yml file. I do think >>though, >>if Robert agrees, that the yml file would be more conveniently replaced by >>a pure ruby config file, as more and more options could come along. >> >>I'll start the work once (and if) Robert agrees. >> >>Cheers, >>Fausto >> >>On 2/2/07, Ashish Sahni wrote: >> >> >> Hi Folks, >> >>With the current rails-integration+JRuby deployed as a war file on >>Tomcat or GlassFish I >>see some issues (a couple of them #7135, 7136). So in the interim I >>decided to use the 'dispatch.cgi' route without >>exec'ing another process - this cgi route btw does not encounter any of >>the errors. >> >>Of course this required some code modifications. There is an issue with >>this technique as in the >>cgi-mode the rails app never closes stdout, the stream reader never >>sees EOS >>so there is a workaround I put in place, which is to timeout after a >>small period which works well. >> >>The important question I have is - I'd like to add this functionality so >>that the rails-integration library can >>provide the cgi-route as an option(configurable via web.xml) ? >>Any other ideas or suggestions regarding making the cgi or the default >>route in the war file work ? >> >>Thanks >> >>-- >>Ashish >>http://blogs.sun.com/whacko >> >>_______________________________________________ >>Jruby-extras-devel mailing list >>Jruby-extras-devel at rubyforge.org >>http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> _______________________________________________ >>Jruby-extras-devel mailing list >>Jruby-extras-devel at rubyforge.org >>http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> >>_______________________________________________ >>Jruby-extras-devel mailing list >>Jruby-extras-devel at rubyforge.org >>http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> >_______________________________________________ >Jruby-extras-devel mailing list >Jruby-extras-devel at rubyforge.org >http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/51d41a5b/attachment-0001.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dispatch-me.rb Url: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/51d41a5b/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: closing_output.rb Url: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/51d41a5b/attachment-0003.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: RailsServlet.java Type: application/x-unknown-content-type-javafile_ee Size: 18238 bytes Desc: not available Url : http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/51d41a5b/attachment-0001.bin From fausto.lelli at gmail.com Wed Feb 7 17:34:47 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Wed, 7 Feb 2007 23:34:47 +0100 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45CA52CA.4080705@sun.com> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> Message-ID: Hi, > Since maven is cryptic and I don't want to manually download the files which > already do exist in the jruby dir - what's going on here ? maven build is quite out of date by now, sorry, we're currently busy keeping up with jruby and rails new releases ... just copying the files from the svn should do the trick anyway > Sorry for being vague. > Since the current dispatch route in rails integration was not fully > functional for me > I tried to go the cgi route. see attached dispatch-me.cgi and the > goCgiRoute > method in RailsServlet.java > This almost works but the EOS is still not seen by the stream reading code > in RailsServlet. Any ideas ? I'll surely give it a try soon, thanks. No ideas about the closing of the stream by now :( F. > Hi Fausto, > Please see inline: > > Fausto Lelli wrote: > Hi Ashish, > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > > Hmmm ... With a jruby build a couple of days old and unmodified > rails-integration code > I'm not seeing any explicit errors(other than the seemingly harmless error > in the log when > config.breakpoint-server set to false) but I do see the following odd > behaviour: > > 1. On the very *first* load of the webapp no output is returned to the > browser. > 2. After an edit/update operation is performed the db is updated correctly > but > the response on the browser is again a null (content-length: 0) > > This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to > get to work at all. > Attached is a stacktrace of a request in process in tomcat which eventually > returns > with internal server error. > > Browser cache is enabled(Firefox). > What web server are you using ? And are things working flawlessly for you ? > > W.r.t to the EOS issue I referred to in my original email - Takai Naoto > suggested the following: > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > > and calling 'require closing_output.rb' in the dispatch-cgi code > > Well, it should work, right ? but does not, any clues. I can post the code > modifications I have > for the cgi route if needed. > > Thanks > Ashish > > > > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think > though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > > > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > # > # The contents of this file are subject to the terms > # of the Common Development and Distribution License > # (the License). You may not use this file except in > # compliance with the License. > # > # You can obtain a copy of the license at > # https://glassfish.dev.java.net/public/CDDLv1.0.html or > # glassfish/bootstrap/legal/CDDLv1.0.txt. > # See the License for the specific language governing > # permissions and limitations under the License. > # > # When distributing Covered Code, include this CDDL > # Header Notice in each file and include the License file > # at glassfish/bootstrap/legal/CDDLv1.0.txt. > # If applicable, add the following below the CDDL Header, > # with the fields enclosed by brackets [] replaced by > # you own identifying information: > # "Portions Copyrighted [year] [name of copyright owner]" > # > # Copyright 2006 Sun Microsystems, Inc. All rights reserved. > # > require 'cgi/force_nph' > require 'jdk_logger' > require 'closing_output.rb' > > #info = $req.getRequestProcessor() > #headers = $req.getMimeHeaders() > headers = $req.getHeaderNames() > > request_uri = $req.getRequestURI() > > > # RFC3875 The Common Gateway Interface (CGI) Version 1.1 > ENV['AUTH_TYPE'] = $req.getAuthType().to_s > ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s > ENV['CONTENT_TYPE'] = $req.getContentType() > ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' > ENV['PATH_INFO'] = request_uri > ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first > ENV['QUERY_STRING'] = $req.queryString().to_s > ENV['REMOTE_ADDR'] = $req.getRemoteAddr() > ENV['REMOTE_HOST'] = $req.remoteHost().to_s > ENV['REMOTE_USER'] = $req.getRemoteUser().to_s > ENV['REQUEST_METHOD'] = $req.getMethod() > ENV['SCRIPT_NAME'] = '' > ENV['SERVER_NAME'] = $req.serverName().to_s > ENV['SERVER_PORT'] = $req.getServerPort().to_s > ENV['SERVER_PROTOCOL'] = $req.protocol().to_s > ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' > > #for i in 0 ... headers.size > # name = headers.getName(i).to_s > # value = headers.getValue(i).to_s > # ENV['HTTP_' + name.upcase.tr('-','_')] = value > #end > > while headers.hasMoreElements() > name = headers.nextElement() > value = $req.getHeader(name).to_s > ENV['HTTP_' + name.upcase.tr('-','_')] = value > end > > require "dispatcher" > > Dispatcher.dispatch > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out, :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > From robert at cs.auckland.ac.nz Wed Feb 7 17:54:43 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Thu, 08 Feb 2007 11:54:43 +1300 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45CA52CA.4080705@sun.com> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> Message-ID: <45CA58B3.90809@cs.auckland.ac.nz> I think jline probably isn't required for the scaffolding example. The maven build files for samples are getting out of date, as more work is going into the rake build tasks. To create a war try: rake war:standalone:create To run it in place with Jetty: rake war:standalone:run I've seen empty pages pop up earlier with the dispatchers when it was failing to generate the error pages, adding extra debugging lines to the dispatchers helped to find out what was going on. Is it ok if we add the code into the repository as a subclass of RailsServlet to try out with the existing samples and packaging? Cheers, Robert Ashish Sahni wrote: > Fausto Lelli wrote: >> Hi Ashish >> >> in jruby-extras/trunk/rails-integration/examples there is a sample >> weapps "scaffold" that used to work. I used >> java 5 >> tomcat 5.0.28 >> jruby 0.9.1 >> rails 1.1.6 >> >> could you try it out and see if it works? >> > I can give it a try but I seem to be falling at the first hurdle > Get errors along the lines > ---------- > 1) jline:jline:jar:0.9.91-SNAPSHOT > > Try downloading the file manually from the project website. > > Then, install it using the command: > mvn install:install-file -DgroupId=jline -DartifactId=jline \ > -Dversion=0.9.91-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file > > Path to dependency: > 1) org.jruby.extras.rails-integration.samples:scaffoldtest:war:1.0-SNAPSHOT > 2) jline:jline:jar:0.9.91-SNAPSHOT > ---------- > Since maven is cryptic and I don't want to manually download the files which > already do exist in the jruby dir - what's going on here ? > > >> >>> So in the interim I >>> decided to use the 'dispatch.cgi' route without >>> exec'ing another process - this cgi route btw does not encounter any of >>> the errors. >>> >> >> could you elaborate a bit about it ? i didn't get it :( >> > Sorry for being vague. > Since the current dispatch route in rails integration was not fully > functional for me > I tried to go the cgi route. see attached dispatch-me.cgi and the > goCgiRoute > method in RailsServlet.java > This almost works but the EOS is still not seen by the stream reading code > in RailsServlet. Any ideas ? > > Thanks > Ashish > >> F. >> >> On 2/7/07, Ashish Sahni wrote: >> >>> (resending - my original email didn't make it because of size limitations I >>> suppose, >>> let me know if you'd like to take a look at the stack trace and I'll send >>> the relevant sections) >>> >>> Hi Fausto, >>> Please see inline: >>> >>> Fausto Lelli wrote: >>> Hi Ashish, >>> >>> >>> >>> see some issues (a couple of them #7135, 7136). So in the interim I >>> >>> I did run into this issues at first too, and if I remember well, I all went >>> away went I enabled the browser cache, don't ask me why though ! >>> >>> >>> Hmmm ... With a jruby build a couple of days old and unmodified >>> rails-integration code >>> I'm not seeing any explicit errors(other than the seemingly harmless error >>> in the log when >>> config.breakpoint-server set to false) but I do see the following odd >>> behaviour: >>> >>> 1. On the very *first* load of the webapp no output is returned to the >>> browser. >>> 2. After an edit/update operation is performed the db is updated correctly >>> but >>> the response on the browser is again a null (content-length: 0) >>> >>> This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to >>> get to work at all. >>> Attached is a stacktrace of a request in process in tomcat which eventually >>> returns >>> with internal server error. >>> >>> Browser cache is enabled(Firefox). >>> What web server are you using ? And are things working flawlessly for you ? >>> >>> W.r.t to the EOS issue I referred to in my original email - Takai Naoto >>> suggested the following: >>> >>> # in closing_output.rb >>> module ActionController >>> class CGIResponse >>> alias :original_out :out >>> def out(output = $stdout) >>> original_out output >>> output.close if output.respond_to :close >>> end >>> end >>> end >>> >>> and calling 'require closing_output.rb' in the dispatch-cgi code >>> >>> Well, it should work, right ? but does not, any clues. I can post the code >>> modifications I have >>> for the cgi route if needed. >>> >>> Thanks >>> Ashish >>> >>> >>> >>> >>> Anyway, during these past days we've been working on a way to configure >>> the rails-integration, which is now realized as an yml file. I do think >>> though, >>> if Robert agrees, that the yml file would be more conveniently replaced by >>> a pure ruby config file, as more and more options could come along. >>> >>> I'll start the work once (and if) Robert agrees. >>> >>> Cheers, >>> Fausto >>> >>> On 2/2/07, Ashish Sahni wrote: >>> >>> >>> Hi Folks, >>> >>> With the current rails-integration+JRuby deployed as a war file on >>> Tomcat or GlassFish I >>> see some issues (a couple of them #7135, 7136). So in the interim I >>> decided to use the 'dispatch.cgi' route without >>> exec'ing another process - this cgi route btw does not encounter any of >>> the errors. >>> >>> Of course this required some code modifications. There is an issue with >>> this technique as in the >>> cgi-mode the rails app never closes stdout, the stream reader never >>> sees EOS >>> so there is a workaround I put in place, which is to timeout after a >>> small period which works well. >>> >>> The important question I have is - I'd like to add this functionality so >>> that the rails-integration library can >>> provide the cgi-route as an option(configurable via web.xml) ? >>> Any other ideas or suggestions regarding making the cgi or the default >>> route in the war file work ? >>> >>> Thanks >>> >>> -- >>> Ashish >>> http://blogs.sun.com/whacko >>> >>> _______________________________________________ >>> Jruby-extras-devel mailing list >>> Jruby-extras-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>> >>> >>> _______________________________________________ >>> Jruby-extras-devel mailing list >>> Jruby-extras-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>> >>> >>> >>> _______________________________________________ >>> Jruby-extras-devel mailing list >>> Jruby-extras-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>> >>> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> > > ------------------------------------------------------------------------ > > # > # The contents of this file are subject to the terms > # of the Common Development and Distribution License > # (the License). You may not use this file except in > # compliance with the License. > # > # You can obtain a copy of the license at > # https://glassfish.dev.java.net/public/CDDLv1.0.html or > # glassfish/bootstrap/legal/CDDLv1.0.txt. > # See the License for the specific language governing > # permissions and limitations under the License. > # > # When distributing Covered Code, include this CDDL > # Header Notice in each file and include the License file > # at glassfish/bootstrap/legal/CDDLv1.0.txt. > # If applicable, add the following below the CDDL Header, > # with the fields enclosed by brackets [] replaced by > # you own identifying information: > # "Portions Copyrighted [year] [name of copyright owner]" > # > # Copyright 2006 Sun Microsystems, Inc. All rights reserved. > # > require 'cgi/force_nph' > require 'jdk_logger' > require 'closing_output.rb' > > #info = $req.getRequestProcessor() > #headers = $req.getMimeHeaders() > headers = $req.getHeaderNames() > > request_uri = $req.getRequestURI() > > > # RFC3875 The Common Gateway Interface (CGI) Version 1.1 > ENV['AUTH_TYPE'] = $req.getAuthType().to_s > ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s > ENV['CONTENT_TYPE'] = $req.getContentType() > ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' > ENV['PATH_INFO'] = request_uri > ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first > ENV['QUERY_STRING'] = $req.queryString().to_s > ENV['REMOTE_ADDR'] = $req.getRemoteAddr() > ENV['REMOTE_HOST'] = $req.remoteHost().to_s > ENV['REMOTE_USER'] = $req.getRemoteUser().to_s > ENV['REQUEST_METHOD'] = $req.getMethod() > ENV['SCRIPT_NAME'] = '' > ENV['SERVER_NAME'] = $req.serverName().to_s > ENV['SERVER_PORT'] = $req.getServerPort().to_s > ENV['SERVER_PROTOCOL'] = $req.protocol().to_s > ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' > > #for i in 0 ... headers.size > # name = headers.getName(i).to_s > # value = headers.getValue(i).to_s > # ENV['HTTP_' + name.upcase.tr('-','_')] = value > #end > > while headers.hasMoreElements() > name = headers.nextElement() > value = $req.getHeader(name).to_s > ENV['HTTP_' + name.upcase.tr('-','_')] = value > end > > require "dispatcher" > > Dispatcher.dispatch > ------------------------------------------------------------------------ > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out, :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > ------------------------------------------------------------------------ > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070208/09b94ab0/attachment-0001.html From superchrisnelson at gmail.com Wed Feb 7 20:24:52 2007 From: superchrisnelson at gmail.com (Chris Nelson) Date: Wed, 7 Feb 2007 20:24:52 -0500 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> Message-ID: Hey, I've been trying to keep the maven pom for extras reasonably up to date ish, since I find it convenient. The nice thing about it is it makes it really easy to add extra dependencies like (Mysql DB Driver), etc. In order to get past this jline problem i manually installed the jline jar from the jruby distribution. I think there was one more also I needed to install, can't remember now. On 2/7/07, Fausto Lelli wrote: > Hi, > > > Since maven is cryptic and I don't want to manually download the files which > > already do exist in the jruby dir - what's going on here ? > maven build is quite out of date by now, sorry, we're currently busy > keeping up with jruby and rails new releases ... just copying the > files from the svn should do the trick anyway > > > > Sorry for being vague. > > Since the current dispatch route in rails integration was not fully > > functional for me > > I tried to go the cgi route. see attached dispatch-me.cgi and the > > goCgiRoute > > method in RailsServlet.java > > This almost works but the EOS is still not seen by the stream reading code > > in RailsServlet. Any ideas ? > I'll surely give it a try soon, thanks. No ideas about the closing of > the stream by > now :( > > F. > > > > Hi Fausto, > > Please see inline: > > > > Fausto Lelli wrote: > > Hi Ashish, > > > > > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > > > I did run into this issues at first too, and if I remember well, I all went > > away went I enabled the browser cache, don't ask me why though ! > > > > > > Hmmm ... With a jruby build a couple of days old and unmodified > > rails-integration code > > I'm not seeing any explicit errors(other than the seemingly harmless error > > in the log when > > config.breakpoint-server set to false) but I do see the following odd > > behaviour: > > > > 1. On the very *first* load of the webapp no output is returned to the > > browser. > > 2. After an edit/update operation is performed the db is updated correctly > > but > > the response on the browser is again a null (content-length: 0) > > > > This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to > > get to work at all. > > Attached is a stacktrace of a request in process in tomcat which eventually > > returns > > with internal server error. > > > > Browser cache is enabled(Firefox). > > What web server are you using ? And are things working flawlessly for you ? > > > > W.r.t to the EOS issue I referred to in my original email - Takai Naoto > > suggested the following: > > > > # in closing_output.rb > > module ActionController > > class CGIResponse > > alias :original_out :out > > def out(output = $stdout) > > original_out output > > output.close if output.respond_to :close > > end > > end > > end > > > > and calling 'require closing_output.rb' in the dispatch-cgi code > > > > Well, it should work, right ? but does not, any clues. I can post the code > > modifications I have > > for the cgi route if needed. > > > > Thanks > > Ashish > > > > > > > > > > Anyway, during these past days we've been working on a way to configure > > the rails-integration, which is now realized as an yml file. I do think > > though, > > if Robert agrees, that the yml file would be more conveniently replaced by > > a pure ruby config file, as more and more options could come along. > > > > I'll start the work once (and if) Robert agrees. > > > > Cheers, > > Fausto > > > > On 2/2/07, Ashish Sahni wrote: > > > > > > Hi Folks, > > > > With the current rails-integration+JRuby deployed as a war file on > > Tomcat or GlassFish I > > see some issues (a couple of them #7135, 7136). So in the interim I > > decided to use the 'dispatch.cgi' route without > > exec'ing another process - this cgi route btw does not encounter any of > > the errors. > > > > Of course this required some code modifications. There is an issue with > > this technique as in the > > cgi-mode the rails app never closes stdout, the stream reader never > > sees EOS > > so there is a workaround I put in place, which is to timeout after a > > small period which works well. > > > > The important question I have is - I'd like to add this functionality so > > that the rails-integration library can > > provide the cgi-route as an option(configurable via web.xml) ? > > Any other ideas or suggestions regarding making the cgi or the default > > route in the war file work ? > > > > Thanks > > > > -- > > Ashish > > http://blogs.sun.com/whacko > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > > > > # > > # The contents of this file are subject to the terms > > # of the Common Development and Distribution License > > # (the License). You may not use this file except in > > # compliance with the License. > > # > > # You can obtain a copy of the license at > > # https://glassfish.dev.java.net/public/CDDLv1.0.html or > > # glassfish/bootstrap/legal/CDDLv1.0.txt. > > # See the License for the specific language governing > > # permissions and limitations under the License. > > # > > # When distributing Covered Code, include this CDDL > > # Header Notice in each file and include the License file > > # at glassfish/bootstrap/legal/CDDLv1.0.txt. > > # If applicable, add the following below the CDDL Header, > > # with the fields enclosed by brackets [] replaced by > > # you own identifying information: > > # "Portions Copyrighted [year] [name of copyright owner]" > > # > > # Copyright 2006 Sun Microsystems, Inc. All rights reserved. > > # > > require 'cgi/force_nph' > > require 'jdk_logger' > > require 'closing_output.rb' > > > > #info = $req.getRequestProcessor() > > #headers = $req.getMimeHeaders() > > headers = $req.getHeaderNames() > > > > request_uri = $req.getRequestURI() > > > > > > # RFC3875 The Common Gateway Interface (CGI) Version 1.1 > > ENV['AUTH_TYPE'] = $req.getAuthType().to_s > > ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s > > ENV['CONTENT_TYPE'] = $req.getContentType() > > ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' > > ENV['PATH_INFO'] = request_uri > > ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first > > ENV['QUERY_STRING'] = $req.queryString().to_s > > ENV['REMOTE_ADDR'] = $req.getRemoteAddr() > > ENV['REMOTE_HOST'] = $req.remoteHost().to_s > > ENV['REMOTE_USER'] = $req.getRemoteUser().to_s > > ENV['REQUEST_METHOD'] = $req.getMethod() > > ENV['SCRIPT_NAME'] = '' > > ENV['SERVER_NAME'] = $req.serverName().to_s > > ENV['SERVER_PORT'] = $req.getServerPort().to_s > > ENV['SERVER_PROTOCOL'] = $req.protocol().to_s > > ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' > > > > #for i in 0 ... headers.size > > # name = headers.getName(i).to_s > > # value = headers.getValue(i).to_s > > # ENV['HTTP_' + name.upcase.tr('-','_')] = value > > #end > > > > while headers.hasMoreElements() > > name = headers.nextElement() > > value = $req.getHeader(name).to_s > > ENV['HTTP_' + name.upcase.tr('-','_')] = value > > end > > > > require "dispatcher" > > > > Dispatcher.dispatch > > > > # in closing_output.rb > > module ActionController > > class CGIResponse > > alias :original_out, :out > > def out(output = $stdout) > > original_out output > > output.close if output.respond_to :close > > end > > end > > end > > > > _______________________________________________ > > Jruby-extras-devel mailing list > > Jruby-extras-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From superchrisnelson at gmail.com Wed Feb 7 20:25:38 2007 From: superchrisnelson at gmail.com (Chris Nelson) Date: Wed, 7 Feb 2007 20:25:38 -0500 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45CA58B3.90809@cs.auckland.ac.nz> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> <45CA58B3.90809@cs.auckland.ac.nz> Message-ID: I'll try out your run task, I hadn't seen that before, is it new? One of the reasons I was using maven was for the jetty:run ability. On 2/7/07, Robert Egglestone wrote: > > I think jline probably isn't required for the scaffolding example. > The maven build files for samples are getting out of date, as more work is > going into the rake build tasks. > > To create a war try: > rake war:standalone:create > > To run it in place with Jetty: > rake war:standalone:run > > I've seen empty pages pop up earlier with the dispatchers when it was > failing to generate the error pages, adding extra debugging lines to the > dispatchers helped to find out what was going on. > > Is it ok if we add the code into the repository as a subclass of > RailsServlet to try out with the existing samples and packaging? > > Cheers, > Robert > > Ashish Sahni wrote: > Fausto Lelli wrote: > Hi Ashish > > in jruby-extras/trunk/rails-integration/examples there is a > sample > weapps "scaffold" that used to work. I used > java 5 > tomcat 5.0.28 > jruby 0.9.1 > rails 1.1.6 > > could you try it out and see if it works? > > I can give it a try but I seem to be falling at the first hurdle > Get errors along the lines > > ---------- > 1) jline:jline:jar:0.9.91-SNAPSHOT > > Try downloading the file manually from the project website. > > Then, install it using the command: > mvn install:install-file -DgroupId=jline -DartifactId=jline \ > -Dversion=0.9.91-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file > > Path to dependency: > 1) > org.jruby.extras.rails-integration.samples:scaffoldtest:war:1.0-SNAPSHOT > 2) jline:jline:jar:0.9.91-SNAPSHOT > ---------- > Since maven is cryptic and I don't want to manually download the files which > already do exist in the jruby dir - what's going on here ? > > > > > > So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > could you elaborate a bit about it ? i didn't get it :( > > Sorry for being vague. > Since the current dispatch route in rails integration was not fully > functional for me > I tried to go the cgi route. see attached dispatch-me.cgi and the > goCgiRoute > method in RailsServlet.java > This almost works but the EOS is still not seen by the stream reading code > in RailsServlet. Any ideas ? > > Thanks > Ashish > > > F. > > On 2/7/07, Ashish Sahni wrote: > > > (resending - my original email didn't make it because of size limitations I > suppose, > let me know if you'd like to take a look at the stack trace and I'll send > the relevant sections) > > Hi Fausto, > Please see inline: > > Fausto Lelli wrote: > Hi Ashish, > > > > see some issues (a couple of them #7135, 7136). So in the interim I > > I did run into this issues at first too, and if I remember well, I all went > away went I enabled the browser cache, don't ask me why though ! > > > Hmmm ... With a jruby build a couple of days old and unmodified > rails-integration code > I'm not seeing any explicit errors(other than the seemingly harmless error > in the log when > config.breakpoint-server set to false) but I do see the following odd > behaviour: > > 1. On the very *first* load of the webapp no output is returned to the > browser. > 2. After an edit/update operation is performed the db is updated correctly > but > the response on the browser is again a null (content-length: 0) > > This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to > get to work at all. > Attached is a stacktrace of a request in process in tomcat which eventually > returns > with internal server error. > > Browser cache is enabled(Firefox). > What web server are you using ? And are things working flawlessly for you ? > > W.r.t to the EOS issue I referred to in my original email - Takai Naoto > suggested the following: > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > > and calling 'require closing_output.rb' in the dispatch-cgi code > > Well, it should work, right ? but does not, any clues. I can post the code > modifications I have > for the cgi route if needed. > > Thanks > Ashish > > > > > Anyway, during these past days we've been working on a way to configure > the rails-integration, which is now realized as an yml file. I do think > though, > if Robert agrees, that the yml file would be more conveniently replaced by > a pure ruby config file, as more and more options could come along. > > I'll start the work once (and if) Robert agrees. > > Cheers, > Fausto > > On 2/2/07, Ashish Sahni wrote: > > > Hi Folks, > > With the current rails-integration+JRuby deployed as a war file on > Tomcat or GlassFish I > see some issues (a couple of them #7135, 7136). So in the interim I > decided to use the 'dispatch.cgi' route without > exec'ing another process - this cgi route btw does not encounter any of > the errors. > > Of course this required some code modifications. There is an issue with > this technique as in the > cgi-mode the rails app never closes stdout, the stream reader never > sees EOS > so there is a workaround I put in place, which is to timeout after a > small period which works well. > > The important question I have is - I'd like to add this functionality so > that the rails-integration library can > provide the cgi-route as an option(configurable via web.xml) ? > Any other ideas or suggestions regarding making the cgi or the default > route in the war file work ? > > Thanks > > -- > Ashish > http://blogs.sun.com/whacko > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > ________________________________ > > > # > # The contents of this file are subject to the terms > # of the Common Development and Distribution License > # (the License). You may not use this file except in > # compliance with the License. > # > # You can obtain a copy of the license at > # https://glassfish.dev.java.net/public/CDDLv1.0.html or > # glassfish/bootstrap/legal/CDDLv1.0.txt. > # See the License for the specific language governing > # permissions and limitations under the License. > # > # When distributing Covered Code, include this CDDL > # Header Notice in each file and include the License file > # at glassfish/bootstrap/legal/CDDLv1.0.txt. > # If applicable, add the following below the CDDL Header, > # with the fields enclosed by brackets [] replaced by > # you own identifying information: > # "Portions Copyrighted [year] [name of copyright owner]" > # > # Copyright 2006 Sun Microsystems, Inc. All rights reserved. > # > require 'cgi/force_nph' > require 'jdk_logger' > require 'closing_output.rb' > > #info = $req.getRequestProcessor() > #headers = $req.getMimeHeaders() > headers = $req.getHeaderNames() > > request_uri = $req.getRequestURI() > > > # RFC3875 The Common Gateway Interface (CGI) Version 1.1 > ENV['AUTH_TYPE'] = $req.getAuthType().to_s > ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s > ENV['CONTENT_TYPE'] = $req.getContentType() > ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' > ENV['PATH_INFO'] = request_uri > ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first > ENV['QUERY_STRING'] = $req.queryString().to_s > ENV['REMOTE_ADDR'] = $req.getRemoteAddr() > ENV['REMOTE_HOST'] = $req.remoteHost().to_s > ENV['REMOTE_USER'] = $req.getRemoteUser().to_s > ENV['REQUEST_METHOD'] = $req.getMethod() > ENV['SCRIPT_NAME'] = '' > ENV['SERVER_NAME'] = $req.serverName().to_s > ENV['SERVER_PORT'] = $req.getServerPort().to_s > ENV['SERVER_PROTOCOL'] = $req.protocol().to_s > ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' > > #for i in 0 ... headers.size > # name = headers.getName(i).to_s > # value = headers.getValue(i).to_s > # ENV['HTTP_' + name.upcase.tr('-','_')] = value > #end > > while headers.hasMoreElements() > name = headers.nextElement() > value = $req.getHeader(name).to_s > ENV['HTTP_' + name.upcase.tr('-','_')] = value > end > > require "dispatcher" > > Dispatcher.dispatch > ________________________________ > > # in closing_output.rb > module ActionController > class CGIResponse > alias :original_out, :out > def out(output = $stdout) > original_out output > output.close if output.respond_to :close > end > end > end > ________________________________ > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From robert at cs.auckland.ac.nz Wed Feb 7 23:04:56 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Thu, 08 Feb 2007 17:04:56 +1300 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> <45CA58B3.90809@cs.auckland.ac.nz> Message-ID: <45CAA168.10502@cs.auckland.ac.nz> Yes, it's just been added recently. Also with the work Fausto's done on the configuration files, now extra dependencies can be included in the Rake build too. They can be obtained from the Maven repository if needed. Robert Chris Nelson wrote: > I'll try out your run task, I hadn't seen that before, is it new? One > of the reasons I was using maven was for the jetty:run ability. > > On 2/7/07, Robert Egglestone wrote: > >> I think jline probably isn't required for the scaffolding example. >> The maven build files for samples are getting out of date, as more work is >> going into the rake build tasks. >> >> To create a war try: >> rake war:standalone:create >> >> To run it in place with Jetty: >> rake war:standalone:run >> >> I've seen empty pages pop up earlier with the dispatchers when it was >> failing to generate the error pages, adding extra debugging lines to the >> dispatchers helped to find out what was going on. >> >> Is it ok if we add the code into the repository as a subclass of >> RailsServlet to try out with the existing samples and packaging? >> >> Cheers, >> Robert >> >> Ashish Sahni wrote: >> Fausto Lelli wrote: >> Hi Ashish >> >> in jruby-extras/trunk/rails-integration/examples there is a >> sample >> weapps "scaffold" that used to work. I used >> java 5 >> tomcat 5.0.28 >> jruby 0.9.1 >> rails 1.1.6 >> >> could you try it out and see if it works? >> >> I can give it a try but I seem to be falling at the first hurdle >> Get errors along the lines >> >> ---------- >> 1) jline:jline:jar:0.9.91-SNAPSHOT >> >> Try downloading the file manually from the project website. >> >> Then, install it using the command: >> mvn install:install-file -DgroupId=jline -DartifactId=jline \ >> -Dversion=0.9.91-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file >> >> Path to dependency: >> 1) >> org.jruby.extras.rails-integration.samples:scaffoldtest:war:1.0-SNAPSHOT >> 2) jline:jline:jar:0.9.91-SNAPSHOT >> ---------- >> Since maven is cryptic and I don't want to manually download the files which >> already do exist in the jruby dir - what's going on here ? >> >> >> >> >> >> So in the interim I >> decided to use the 'dispatch.cgi' route without >> exec'ing another process - this cgi route btw does not encounter any of >> the errors. >> >> could you elaborate a bit about it ? i didn't get it :( >> >> Sorry for being vague. >> Since the current dispatch route in rails integration was not fully >> functional for me >> I tried to go the cgi route. see attached dispatch-me.cgi and the >> goCgiRoute >> method in RailsServlet.java >> This almost works but the EOS is still not seen by the stream reading code >> in RailsServlet. Any ideas ? >> >> Thanks >> Ashish >> >> >> F. >> >> On 2/7/07, Ashish Sahni wrote: >> >> >> (resending - my original email didn't make it because of size limitations I >> suppose, >> let me know if you'd like to take a look at the stack trace and I'll send >> the relevant sections) >> >> Hi Fausto, >> Please see inline: >> >> Fausto Lelli wrote: >> Hi Ashish, >> >> >> >> see some issues (a couple of them #7135, 7136). So in the interim I >> >> I did run into this issues at first too, and if I remember well, I all went >> away went I enabled the browser cache, don't ask me why though ! >> >> >> Hmmm ... With a jruby build a couple of days old and unmodified >> rails-integration code >> I'm not seeing any explicit errors(other than the seemingly harmless error >> in the log when >> config.breakpoint-server set to false) but I do see the following odd >> behaviour: >> >> 1. On the very *first* load of the webapp no output is returned to the >> browser. >> 2. After an edit/update operation is performed the db is updated correctly >> but >> the response on the browser is again a null (content-length: 0) >> >> This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to >> get to work at all. >> Attached is a stacktrace of a request in process in tomcat which eventually >> returns >> with internal server error. >> >> Browser cache is enabled(Firefox). >> What web server are you using ? And are things working flawlessly for you ? >> >> W.r.t to the EOS issue I referred to in my original email - Takai Naoto >> suggested the following: >> >> # in closing_output.rb >> module ActionController >> class CGIResponse >> alias :original_out :out >> def out(output = $stdout) >> original_out output >> output.close if output.respond_to :close >> end >> end >> end >> >> and calling 'require closing_output.rb' in the dispatch-cgi code >> >> Well, it should work, right ? but does not, any clues. I can post the code >> modifications I have >> for the cgi route if needed. >> >> Thanks >> Ashish >> >> >> >> >> Anyway, during these past days we've been working on a way to configure >> the rails-integration, which is now realized as an yml file. I do think >> though, >> if Robert agrees, that the yml file would be more conveniently replaced by >> a pure ruby config file, as more and more options could come along. >> >> I'll start the work once (and if) Robert agrees. >> >> Cheers, >> Fausto >> >> On 2/2/07, Ashish Sahni wrote: >> >> >> Hi Folks, >> >> With the current rails-integration+JRuby deployed as a war file on >> Tomcat or GlassFish I >> see some issues (a couple of them #7135, 7136). So in the interim I >> decided to use the 'dispatch.cgi' route without >> exec'ing another process - this cgi route btw does not encounter any of >> the errors. >> >> Of course this required some code modifications. There is an issue with >> this technique as in the >> cgi-mode the rails app never closes stdout, the stream reader never >> sees EOS >> so there is a workaround I put in place, which is to timeout after a >> small period which works well. >> >> The important question I have is - I'd like to add this functionality so >> that the rails-integration library can >> provide the cgi-route as an option(configurable via web.xml) ? >> Any other ideas or suggestions regarding making the cgi or the default >> route in the war file work ? >> >> Thanks >> >> -- >> Ashish >> http://blogs.sun.com/whacko >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> >> ________________________________ >> >> >> # >> # The contents of this file are subject to the terms >> # of the Common Development and Distribution License >> # (the License). You may not use this file except in >> # compliance with the License. >> # >> # You can obtain a copy of the license at >> # https://glassfish.dev.java.net/public/CDDLv1.0.html or >> # glassfish/bootstrap/legal/CDDLv1.0.txt. >> # See the License for the specific language governing >> # permissions and limitations under the License. >> # >> # When distributing Covered Code, include this CDDL >> # Header Notice in each file and include the License file >> # at glassfish/bootstrap/legal/CDDLv1.0.txt. >> # If applicable, add the following below the CDDL Header, >> # with the fields enclosed by brackets [] replaced by >> # you own identifying information: >> # "Portions Copyrighted [year] [name of copyright owner]" >> # >> # Copyright 2006 Sun Microsystems, Inc. All rights reserved. >> # >> require 'cgi/force_nph' >> require 'jdk_logger' >> require 'closing_output.rb' >> >> #info = $req.getRequestProcessor() >> #headers = $req.getMimeHeaders() >> headers = $req.getHeaderNames() >> >> request_uri = $req.getRequestURI() >> >> >> # RFC3875 The Common Gateway Interface (CGI) Version 1.1 >> ENV['AUTH_TYPE'] = $req.getAuthType().to_s >> ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s >> ENV['CONTENT_TYPE'] = $req.getContentType() >> ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' >> ENV['PATH_INFO'] = request_uri >> ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first >> ENV['QUERY_STRING'] = $req.queryString().to_s >> ENV['REMOTE_ADDR'] = $req.getRemoteAddr() >> ENV['REMOTE_HOST'] = $req.remoteHost().to_s >> ENV['REMOTE_USER'] = $req.getRemoteUser().to_s >> ENV['REQUEST_METHOD'] = $req.getMethod() >> ENV['SCRIPT_NAME'] = '' >> ENV['SERVER_NAME'] = $req.serverName().to_s >> ENV['SERVER_PORT'] = $req.getServerPort().to_s >> ENV['SERVER_PROTOCOL'] = $req.protocol().to_s >> ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' >> >> #for i in 0 ... headers.size >> # name = headers.getName(i).to_s >> # value = headers.getValue(i).to_s >> # ENV['HTTP_' + name.upcase.tr('-','_')] = value >> #end >> >> while headers.hasMoreElements() >> name = headers.nextElement() >> value = $req.getHeader(name).to_s >> ENV['HTTP_' + name.upcase.tr('-','_')] = value >> end >> >> require "dispatcher" >> >> Dispatcher.dispatch >> ________________________________ >> >> # in closing_output.rb >> module ActionController >> class CGIResponse >> alias :original_out, :out >> def out(output = $stdout) >> original_out output >> output.close if output.respond_to :close >> end >> end >> end >> ________________________________ >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070208/2a285fc4/attachment-0001.html From Ashish.Sahni at Sun.COM Thu Feb 8 00:44:38 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Wed, 07 Feb 2007 21:44:38 -0800 Subject: [Jruby-extras-devel] RoRasWAR In-Reply-To: <45CA58B3.90809@cs.auckland.ac.nz> References: <4554B46D.2050502@perspecsys.com> <4556DF3F.9040403@cs.auckland.ac.nz> <45C287E8.3060906@sun.com> <45CA0E98.8070003@sun.com> <45CA52CA.4080705@sun.com> <45CA58B3.90809@cs.auckland.ac.nz> Message-ID: <45CAB8C6.7090206@sun.com> Robert Egglestone wrote: > I think jline probably isn't required for the scaffolding example. > The maven build files for samples are getting out of date, as more > work is going into the rake build tasks. > > To create a war try: > rake war:standalone:create > > To run it in place with Jetty: > rake war:standalone:run > > I've seen empty pages pop up earlier with the dispatchers when it was > failing to generate the error pages, adding extra debugging lines to > the dispatchers helped to find out what was going on. > > Is it ok if we add the code into the repository as a subclass of > RailsServlet to try out with the existing samples and packaging? Absolutely. Let me know if you'd like me to clean it up. Its a bit messy right now ;) -Ashish > > Cheers, > Robert > > Ashish Sahni wrote: >> Fausto Lelli wrote: >>> Hi Ashish >>> >>> in jruby-extras/trunk/rails-integration/examples there is a sample >>> weapps "scaffold" that used to work. I used >>> java 5 >>> tomcat 5.0.28 >>> jruby 0.9.1 >>> rails 1.1.6 >>> >>> could you try it out and see if it works? >>> >> I can give it a try but I seem to be falling at the first hurdle >> Get errors along the lines >> ---------- >> 1) jline:jline:jar:0.9.91-SNAPSHOT >> >> Try downloading the file manually from the project website. >> >> Then, install it using the command: >> mvn install:install-file -DgroupId=jline -DartifactId=jline \ >> -Dversion=0.9.91-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file >> >> Path to dependency: >> 1) org.jruby.extras.rails-integration.samples:scaffoldtest:war:1.0-SNAPSHOT >> 2) jline:jline:jar:0.9.91-SNAPSHOT >> ---------- >> Since maven is cryptic and I don't want to manually download the files which >> already do exist in the jruby dir - what's going on here ? >> >> >>> >>>> So in the interim I >>>> decided to use the 'dispatch.cgi' route without >>>> exec'ing another process - this cgi route btw does not encounter any of >>>> the errors. >>>> >>> >>> could you elaborate a bit about it ? i didn't get it :( >>> >> Sorry for being vague. >> Since the current dispatch route in rails integration was not fully >> functional for me >> I tried to go the cgi route. see attached dispatch-me.cgi and the >> goCgiRoute >> method in RailsServlet.java >> This almost works but the EOS is still not seen by the stream reading >> code >> in RailsServlet. Any ideas ? >> >> Thanks >> Ashish >> >>> F. >>> >>> On 2/7/07, Ashish Sahni wrote: >>> >>>> (resending - my original email didn't make it because of size limitations I >>>> suppose, >>>> let me know if you'd like to take a look at the stack trace and I'll send >>>> the relevant sections) >>>> >>>> Hi Fausto, >>>> Please see inline: >>>> >>>> Fausto Lelli wrote: >>>> Hi Ashish, >>>> >>>> >>>> >>>> see some issues (a couple of them #7135, 7136). So in the interim I >>>> >>>> I did run into this issues at first too, and if I remember well, I all went >>>> away went I enabled the browser cache, don't ask me why though ! >>>> >>>> >>>> Hmmm ... With a jruby build a couple of days old and unmodified >>>> rails-integration code >>>> I'm not seeing any explicit errors(other than the seemingly harmless error >>>> in the log when >>>> config.breakpoint-server set to false) but I do see the following odd >>>> behaviour: >>>> >>>> 1. On the very *first* load of the webapp no output is returned to the >>>> browser. >>>> 2. After an edit/update operation is performed the db is updated correctly >>>> but >>>> the response on the browser is again a null (content-length: 0) >>>> >>>> This is observed behaviour on glassfish v2. On tomcat(6.x) I can't seem to >>>> get to work at all. >>>> Attached is a stacktrace of a request in process in tomcat which eventually >>>> returns >>>> with internal server error. >>>> >>>> Browser cache is enabled(Firefox). >>>> What web server are you using ? And are things working flawlessly for you ? >>>> >>>> W.r.t to the EOS issue I referred to in my original email - Takai Naoto >>>> suggested the following: >>>> >>>> # in closing_output.rb >>>> module ActionController >>>> class CGIResponse >>>> alias :original_out :out >>>> def out(output = $stdout) >>>> original_out output >>>> output.close if output.respond_to :close >>>> end >>>> end >>>> end >>>> >>>> and calling 'require closing_output.rb' in the dispatch-cgi code >>>> >>>> Well, it should work, right ? but does not, any clues. I can post the code >>>> modifications I have >>>> for the cgi route if needed. >>>> >>>> Thanks >>>> Ashish >>>> >>>> >>>> >>>> >>>> Anyway, during these past days we've been working on a way to configure >>>> the rails-integration, which is now realized as an yml file. I do think >>>> though, >>>> if Robert agrees, that the yml file would be more conveniently replaced by >>>> a pure ruby config file, as more and more options could come along. >>>> >>>> I'll start the work once (and if) Robert agrees. >>>> >>>> Cheers, >>>> Fausto >>>> >>>> On 2/2/07, Ashish Sahni wrote: >>>> >>>> >>>> Hi Folks, >>>> >>>> With the current rails-integration+JRuby deployed as a war file on >>>> Tomcat or GlassFish I >>>> see some issues (a couple of them #7135, 7136). So in the interim I >>>> decided to use the 'dispatch.cgi' route without >>>> exec'ing another process - this cgi route btw does not encounter any of >>>> the errors. >>>> >>>> Of course this required some code modifications. There is an issue with >>>> this technique as in the >>>> cgi-mode the rails app never closes stdout, the stream reader never >>>> sees EOS >>>> so there is a workaround I put in place, which is to timeout after a >>>> small period which works well. >>>> >>>> The important question I have is - I'd like to add this functionality so >>>> that the rails-integration library can >>>> provide the cgi-route as an option(configurable via web.xml) ? >>>> Any other ideas or suggestions regarding making the cgi or the default >>>> route in the war file work ? >>>> >>>> Thanks >>>> >>>> -- >>>> Ashish >>>> http://blogs.sun.com/whacko >>>> >>>> _______________________________________________ >>>> Jruby-extras-devel mailing list >>>> Jruby-extras-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>>> >>>> >>>> _______________________________________________ >>>> Jruby-extras-devel mailing list >>>> Jruby-extras-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>>> >>>> >>>> >>>> _______________________________________________ >>>> Jruby-extras-devel mailing list >>>> Jruby-extras-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>>> >>>> >>> _______________________________________________ >>> Jruby-extras-devel mailing list >>> Jruby-extras-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>> >> >> ------------------------------------------------------------------------ >> >> # >> # The contents of this file are subject to the terms >> # of the Common Development and Distribution License >> # (the License). You may not use this file except in >> # compliance with the License. >> # >> # You can obtain a copy of the license at >> # https://glassfish.dev.java.net/public/CDDLv1.0.html or >> # glassfish/bootstrap/legal/CDDLv1.0.txt. >> # See the License for the specific language governing >> # permissions and limitations under the License. >> # >> # When distributing Covered Code, include this CDDL >> # Header Notice in each file and include the License file >> # at glassfish/bootstrap/legal/CDDLv1.0.txt. >> # If applicable, add the following below the CDDL Header, >> # with the fields enclosed by brackets [] replaced by >> # you own identifying information: >> # "Portions Copyrighted [year] [name of copyright owner]" >> # >> # Copyright 2006 Sun Microsystems, Inc. All rights reserved. >> # >> require 'cgi/force_nph' >> require 'jdk_logger' >> require 'closing_output.rb' >> >> #info = $req.getRequestProcessor() >> #headers = $req.getMimeHeaders() >> headers = $req.getHeaderNames() >> >> request_uri = $req.getRequestURI() >> >> >> # RFC3875 The Common Gateway Interface (CGI) Version 1.1 >> ENV['AUTH_TYPE'] = $req.getAuthType().to_s >> ENV['CONTENT_LENGTH'] = $req.getContentLength().to_s >> ENV['CONTENT_TYPE'] = $req.getContentType() >> ENV['GATEWAY_INTERFACE'] = 'CGI/1.1' >> ENV['PATH_INFO'] = request_uri >> ENV['PATH_TRANSLATED'] = request_uri.split('?', 2).first >> ENV['QUERY_STRING'] = $req.queryString().to_s >> ENV['REMOTE_ADDR'] = $req.getRemoteAddr() >> ENV['REMOTE_HOST'] = $req.remoteHost().to_s >> ENV['REMOTE_USER'] = $req.getRemoteUser().to_s >> ENV['REQUEST_METHOD'] = $req.getMethod() >> ENV['SCRIPT_NAME'] = '' >> ENV['SERVER_NAME'] = $req.serverName().to_s >> ENV['SERVER_PORT'] = $req.getServerPort().to_s >> ENV['SERVER_PROTOCOL'] = $req.protocol().to_s >> ENV['SERVER_SOFTWARE'] = 'Grizzly/1.0.4' >> >> #for i in 0 ... headers.size >> # name = headers.getName(i).to_s >> # value = headers.getValue(i).to_s >> # ENV['HTTP_' + name.upcase.tr('-','_')] = value >> #end >> >> while headers.hasMoreElements() >> name = headers.nextElement() >> value = $req.getHeader(name).to_s >> ENV['HTTP_' + name.upcase.tr('-','_')] = value >> end >> >> require "dispatcher" >> >> Dispatcher.dispatch >> ------------------------------------------------------------------------ >> >> # in closing_output.rb >> module ActionController >> class CGIResponse >> alias :original_out, :out >> def out(output = $stdout) >> original_out output >> output.close if output.respond_to :close >> end >> end >> end >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel > ------------------------------------------------------------------------ > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ashish http://blogs.sun.com/whacko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070207/246bbf5f/attachment.html From superchrisnelson at gmail.com Thu Feb 8 19:55:12 2007 From: superchrisnelson at gmail.com (Chris Nelson) Date: Thu, 8 Feb 2007 19:55:12 -0500 Subject: [Jruby-extras-devel] RORAsWAR Progress... one step forward and one step back Message-ID: All, I just now tried out the latest RORAsWar code for my scaffolding example. I had to make one minor tweak to JRubyException to get it to compile against jruby SVN head (as of yesterday). The good news is that it came up with out the nil error in flash. Bad news is that my edit forms don't work. Records get created, but without values. This seems like a regression... I thought we hit this one before. Time for some testcases maybe? I'll start thinking about how to test this code, anyone else feel free to chime in. BTW, I'm running with mvn jetty:run still, tho I can't see how that would make a difference. And the date editors work now with latest Jruby SVN code :) --Chris From robert at cs.auckland.ac.nz Thu Feb 8 21:52:17 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Fri, 09 Feb 2007 15:52:17 +1300 Subject: [Jruby-extras-devel] RORAsWAR Progress... one step forward and one step back In-Reply-To: References: Message-ID: <45CBE1E1.5020404@cs.auckland.ac.nz> Breaking the edit forms was my fault, I was trying out a different implementation of java_servlet_dispatcher (java_servlet_dispatcher_compatible) in the hope of working around the multiparameter problems. I've reverted it to the original one and they work again. Cheers, Robert Chris Nelson wrote: > All, > > I just now tried out the latest RORAsWar code for my scaffolding > example. I had to make one minor tweak to JRubyException to get it to > compile against jruby SVN head (as of yesterday). The good news is > that it came up with out the nil error in flash. Bad news is that my > edit forms don't work. Records get created, but without values. This > seems like a regression... I thought we hit this one before. > > Time for some testcases maybe? I'll start thinking about how to test > this code, anyone else feel free to chime in. > > BTW, I'm running with mvn jetty:run still, tho I can't see how that > would make a difference. And the date editors work now with latest > Jruby SVN code :) > > --Chris > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From robert at cs.auckland.ac.nz Thu Feb 8 22:05:56 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Fri, 09 Feb 2007 16:05:56 +1300 Subject: [Jruby-extras-devel] plaincharset Message-ID: <45CBE514.3080306@cs.auckland.ac.nz> Hi all, I've noticed that when plaincharset.jar is only in WEB-INF/lib, under Jetty at least, it won't get picked up as a provider, which produces NPEs for Ruby strings (the UnsupportedEncodingExceptions get ignored). Has anyone seen similar situations on other application servers, or knows whether it's possible to package it as part of the webapp? Cheers, Robert From nicksieger at gmail.com Thu Feb 8 22:55:13 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Thu, 8 Feb 2007 21:55:13 -0600 Subject: [Jruby-extras-devel] plaincharset In-Reply-To: <45CBE514.3080306@cs.auckland.ac.nz> References: <45CBE514.3080306@cs.auckland.ac.nz> Message-ID: On 2/8/07, Robert Egglestone wrote: > > Hi all, > > I've noticed that when plaincharset.jar is only in WEB-INF/lib, under > Jetty at least, it won't get picked up as a provider, which produces > NPEs for Ruby strings (the UnsupportedEncodingExceptions get ignored). > > Has anyone seen similar situations on other application servers, or > knows whether it's possible to package it as part of the webapp? Sorry about the cross-post, but... This is going to be a problem. Despite the javadocs, charset providers are only recognized on the system or boot classpath, so plaincharset.jar cannot reside in the web app and get recognized properly. Because of this, I recommend we try to ditch the charset provider approach altogether if possible. Otherwise, we're going to be confined to obscure installation instructions like "copy plaincharset.jar to your $JAVA_HOME/lib/ext directory", and that's an ugly solution. /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070208/c9c289e6/attachment.html From fausto.lelli at gmail.com Fri Feb 9 00:59:01 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Fri, 9 Feb 2007 06:59:01 +0100 Subject: [Jruby-extras-devel] RORAsWAR Progress... one step forward and one step back In-Reply-To: References: Message-ID: > Time for some testcases maybe? I'll start thinking about how to test > this code, anyone else feel free to chime in. yep we're evaluating the following alternatives: - watir(firewatir) but it works only on windows (needs win32ole) so it seems out of the game unless someone knows of a java porting - selenium - hpricot I'd say that my preference goes to hpricot, I just manage to install it and it seems very easy to use. but, as for now, it uses a bundled jar that is compiled with java6 and I had to move it to the classpath by hand. All I'm trying to say is that hpricot look great but has some trycky installation by now. what do you think guys ? F. On 2/9/07, Chris Nelson wrote: > All, > > I just now tried out the latest RORAsWar code for my scaffolding > example. I had to make one minor tweak to JRubyException to get it to > compile against jruby SVN head (as of yesterday). The good news is > that it came up with out the nil error in flash. Bad news is that my > edit forms don't work. Records get created, but without values. This > seems like a regression... I thought we hit this one before. > > Time for some testcases maybe? I'll start thinking about how to test > this code, anyone else feel free to chime in. > > BTW, I'm running with mvn jetty:run still, tho I can't see how that > would make a difference. And the date editors work now with latest > Jruby SVN code :) > > --Chris > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From jeff.barczewski at gmail.com Mon Feb 12 16:26:39 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 12 Feb 2007 15:26:39 -0600 Subject: [Jruby-extras-devel] Best approach to getting JRuby + Rails in a WAR deployed in application server? Message-ID: <19cda190702121326hefe8f02s675f01c740dc29f9@mail.gmail.com> I know things are in rapid development in this area, but given any of the current limitations, what is the best way to proceed in getting JRuby + Rails in a WAR deployed in an application server. I was guessing that I should be using the trunk of JRuby along with the plugin from the jruby-extras/rails-integration project. That seemed to get me close, but I was still getting errors bringing up the dynamic pages. Static pages of course worked. Also I wasn't sure whether it would be better for me to use Rails 1.1.6 or something more recent ( 1.2.1 or 1.2.2). Also I assume that *nix is the environment most being used for this, that maybe there might be additional issues for windows? So before I dig in further, what is the best approach to getting this (Rails in a WAR) working (minus any outstanding limitations)? Or better put, what do you use on your own boxes as you are working with and testing this? Any additional steps that I can do to minimize any grief? :-) Thanks in advance! Jeff From robert at cs.auckland.ac.nz Tue Feb 13 01:49:47 2007 From: robert at cs.auckland.ac.nz (Robert Egglestone) Date: Tue, 13 Feb 2007 19:49:47 +1300 Subject: [Jruby-extras-devel] rails-integration progress Message-ID: <45D15F8B.5010408@cs.auckland.ac.nz> Hi all, I've combined the existing code with parts of Ashish's code, and the Java session store, and I think we've got something out of it that's fairly good to move forward on. I hope that the flash/session issues have been solved by the session store, and with Rails handling the request body we should have less problems with parameters. As for versions, JRuby needs to be trunk, but Rails 1.1.6, 1.2.1 and 1.2.2 all should be good. Cheers, Robert From fausto.lelli at gmail.com Tue Feb 13 08:22:37 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Tue, 13 Feb 2007 14:22:37 +0100 Subject: [Jruby-extras-devel] rails-integration progress In-Reply-To: <45D15F8B.5010408@cs.auckland.ac.nz> References: <45D15F8B.5010408@cs.auckland.ac.nz> Message-ID: Hi, I can confirm that rails-integration is working for a simple select operation with active record: java 6.0 jruby-trunk rails 1.2.2 I made a little patch to the RailsFactory.java again to cope for windows path in the require method. Also I want to report the following: I tried the war inside tomcat that I launched from withing eclipse. In the case, it seems that the cgi parameter BREAKPOINT_SERVER_PORT get defined, and consequently the Breakpoint.deactivate_drb is fired, which blows up everything. Just commenting out the line 120 in the rails-1.2.2/lib/dispatcher.rb resolved the issue (although in an unorthodox way) Fausto. On 2/13/07, Robert Egglestone wrote: > Hi all, > > I've combined the existing code with parts of Ashish's code, and the > Java session store, and I think we've got something out of it that's > fairly good to move forward on. > > I hope that the flash/session issues have been solved by the session > store, and with Rails handling the request body we should have less > problems with parameters. > > As for versions, JRuby needs to be trunk, but Rails 1.1.6, 1.2.1 and > 1.2.2 all should be good. > > Cheers, > Robert > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From Ashish.Sahni at Sun.COM Tue Feb 13 13:53:48 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Tue, 13 Feb 2007 10:53:48 -0800 Subject: [Jruby-extras-devel] rails-integration progress In-Reply-To: References: <45D15F8B.5010408@cs.auckland.ac.nz> Message-ID: <45D2093C.1090803@sun.com> Hi, Where's the jruby.jar version 0.9.3-SNAPSHOT coming from ? I saw it in one of the create-war rake files yesterday but today on updating the workspace it's there as a build dependency in pom.xml as well and breaking my build. Did I miss something regarding this change ? W.r.t to breakpoint_server - doesn't changing the flag to false in the config/environments/development.rb achieve the same effect ( a lot less intrusive than changing the dispatch code) ? Thanks Ashish Fausto Lelli wrote: > Hi, > > I can confirm that rails-integration is working for a simple select operation > with active record: > java 6.0 > jruby-trunk > rails 1.2.2 > > I made a little patch to the RailsFactory.java again to cope for windows path in > the require method. > > Also I want to report the following: > I tried the war inside tomcat that I launched from withing eclipse. In the case, > it seems that the cgi parameter BREAKPOINT_SERVER_PORT get defined, > and consequently the Breakpoint.deactivate_drb is fired, which blows > up everything. > Just commenting out the line 120 in the rails-1.2.2/lib/dispatcher.rb > resolved the issue > (although in an unorthodox way) > > Fausto. > > On 2/13/07, Robert Egglestone wrote: > >> Hi all, >> >> I've combined the existing code with parts of Ashish's code, and the >> Java session store, and I think we've got something out of it that's >> fairly good to move forward on. >> >> I hope that the flash/session issues have been solved by the session >> store, and with Rails handling the request body we should have less >> problems with parameters. >> >> As for versions, JRuby needs to be trunk, but Rails 1.1.6, 1.2.1 and >> 1.2.2 all should be good. >> >> Cheers, >> Robert >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> >> > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ashish http://blogs.sun.com/whacko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/jruby-extras-devel/attachments/20070213/fe814b1a/attachment.html From Ashish.Sahni at Sun.COM Tue Feb 13 14:06:44 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Tue, 13 Feb 2007 11:06:44 -0800 Subject: [Jruby-extras-devel] rails-integration progress In-Reply-To: <45D2093C.1090803@sun.com> References: <45D15F8B.5010408@cs.auckland.ac.nz> <45D2093C.1090803@sun.com> Message-ID: <45D20C44.8010604@sun.com> Nevermind the 0.9.3-SNAPSHOT query - mvn install:install-file ... to the rescue ;) Thanks Ashish Ashish Sahni wrote: > Hi, > > Where's the jruby.jar version 0.9.3-SNAPSHOT coming from ? I saw it > in one of the create-war rake files yesterday but today on updating > the workspace > it's there as a build dependency in pom.xml as well and breaking my build. > Did I miss something regarding this change ? > > W.r.t to breakpoint_server - doesn't changing the flag to false in the > config/environments/development.rb > achieve the same effect ( a lot less intrusive than changing the > dispatch code) ? > > Thanks > Ashish > > Fausto Lelli wrote: >> Hi, >> >> I can confirm that rails-integration is working for a simple select operation >> with active record: >> java 6.0 >> jruby-trunk >> rails 1.2.2 >> >> I made a little patch to the RailsFactory.java again to cope for windows path in >> the require method. >> >> Also I want to report the following: >> I tried the war inside tomcat that I launched from withing eclipse. In the case, >> it seems that the cgi parameter BREAKPOINT_SERVER_PORT get defined, >> and consequently the Breakpoint.deactivate_drb is fired, which blows >> up everything. >> Just commenting out the line 120 in the rails-1.2.2/lib/dispatcher.rb >> resolved the issue >> (although in an unorthodox way) >> >> Fausto. >> >> On 2/13/07, Robert Egglestone wrote: >> >>> Hi all, >>> >>> I've combined the existing code with parts of Ashish's code, and the >>> Java session store, and I think we've got something out of it that's >>> fairly good to move forward on. >>> >>> I hope that the flash/session issues have been solved by the session >>> store, and with Rails handling the request body we should have less >>> problems with parameters. >>> >>> As for versions, JRuby needs to be trunk, but Rails 1.1.6, 1.2.1 and >>> 1.2.2 all should be good. >>> >>> Cheers, >>> Robert >>> _______________________________________________ >>> Jruby-extras-devel mailing list >>> Jruby-extras-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >>> >>> >> _______________________________________________ >> Jruby-extras-devel mailing list >> Jruby-extras-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/jruby-extras-devel >> > > > -- > Ashish > http://blogs.sun.com/whacko > > ------------------------------------------------------------------------ > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > -- Ashish http://blogs.sun.com/whacko From fausto.lelli at gmail.com Tue Feb 13 17:17:15 2007 From: fausto.lelli at gmail.com (Fausto Lelli) Date: Tue, 13 Feb 2007 23:17:15 +0100 Subject: [Jruby-extras-devel] rails-integration progress In-Reply-To: <45D2093C.1090803@sun.com> References: <45D15F8B.5010408@cs.auckland.ac.nz> <45D2093C.1090803@sun.com> Message-ID: Hi, @Ashish I tried setting that flag but I didn't work for me, anyway I'm sure there is some much nicer way to fix this than what I did, what I did is a no-brainer. @Robert: don't we need to also convert the database.yml from c connect e.g mysql to jdbc in the produced war ? Cheers, Fausto On 2/13/07, Ashish Sahni wrote: > > Hi, > > Where's the jruby.jar version 0.9.3-SNAPSHOT coming from ? I saw it > in one of the create-war rake files yesterday but today on updating the > workspace > it's there as a build dependency in pom.xml as well and breaking my build. > Did I miss something regarding this change ? > > W.r.t to breakpoint_server - doesn't changing the flag to false in the > config/environments/development.rb > achieve the same effect ( a lot less intrusive than changing the dispatch > code) ? > > Thanks > Ashish > > > Fausto Lelli wrote: > Hi, > > I can confirm that rails-integration is working for a simple select > operation > with active record: > java 6.0 > jruby-trunk > rails 1.2.2 > > I made a little patch to the RailsFactory.java again to cope for windows > path in > the require method. > > Also I want to report the following: > I tried the war inside tomcat that I launched from withing eclipse. In the > case, > it seems that the cgi parameter BREAKPOINT_SERVER_PORT get defined, > and consequently the Breakpoint.deactivate_drb is fired, which blows > up everything. > Just commenting out the line 120 in the rails-1.2.2/lib/dispatcher.rb > resolved the issue > (although in an unorthodox way) > > Fausto. > > On 2/13/07, Robert Egglestone wrote: > > > Hi all, > > I've combined the existing code with parts of Ashish's code, and the > Java session store, and I think we've got something out of it that's > fairly good to move forward on. > > I hope that the flash/session issues have been solved by the session > store, and with Rails handling the request body we should have less > problems with parameters. > > As for versions, JRuby needs to be trunk, but Rails 1.1.6, 1.2.1 and > 1.2.2 all should be good. > > Cheers, > Robert > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > > > > -- > Ashish > http://blogs.sun.com/whacko > > > _______________________________________________ > Jruby-extras-devel mailing list > Jruby-extras-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/jruby-extras-devel > From Ashish.Sahni at Sun.COM Tue Feb 13 18:04:11 2007 From: Ashish.Sahni at Sun.COM (Ashish Sahni) Date: Tue, 13 Feb 2007 15:04:11 -0800 Subject: [Jruby-extras-devel] rails-integration progress In-Reply-To: References: <45D15F8B.5010408@cs.auckland.ac.nz> <45D2093C.1090803@sun.com> Message-ID: <45D243EB.3020604@sun.com> Hi Fausto, Thanks for the confirmation. However a standalone war(rake war:standalone:create) with jruby trunk/rails1.2.2 is failing with the following error: Feb 13, 2007 2:12:12 PM org.apache.catalina.core.ApplicationContext log INFO: Failed to load Rails: No such file to load -- thread.so file:/abc/apache-tomcat-6.0.2/webapps/cookbook/WEB-INF/lib/ruby-standard-library.jar!/thread.rb:41:in `require' file:/abc/apache-tomcat-6.0.2/webapps/cookbook/WEB-INF/lib/ruby-standard-library.jar!/thread.rb:41 file:/abc/apache-tomcat-6.0.2/webapps/cookbook/WEB-INF/lib/ruby-standard-library.jar!/rubygems.rb:86:in `require' file:/abc/apache-tomcat-6.0.2/webapps/cookbook/WEB-INF/lib/ruby-standard-library.jar!/rubygems.rb:86 /abc/apache-tomcat-6.0.2/webapps/cookbook/config/boot.rb:43 /abc/apache-tomcat-6.0.2/webapps/cookbook/config/boot.rb:43:in `require' /abc/apache-tomcat-6.0.2/webapps/cookbook/config/boot.rb:43 /abc/apache-tomcat-6.0.2/webapps/cookbook/config/environment.rb:11:in `require' /abc/apache-tomcat-6.0.2/webapps/cookbook/config/environment.rb:11