The /dev/null thing is a hack, pure and simple. Consider it apart from the other fixes Tom mentioned, since those are all valid.

So it's a hack...the alternative is reporting an appropriate platform so that it doesn't try to user devnull on Windows, as has been mentioned. However...

Java is not Windows. Java is not UNIX. Aside from having some similarities to both and slightly different behavior on each, we really comprise an entirely different platform. The long term, correct way to handle this would be to get "java" or "java-unix"/"java-win" accepted as Ruby platforms like any other. If we start to try to emulate one or the other by reporting that we're a stock win32 or unix Ruby, we'll run into other issues because we can't completely support the features of either.

In the short term, this little hack allows this one piece of Rails to work correctly. A slightly better fix would be to provide a patch to the Rails guys that starts adding awareness of "java" as a Ruby platform. The ultimate fix is to get everyone in the Ruby community aware of "java" as a Ruby platform so they can write apps accordingly.

The CR vs CRLF problem is a separate issue, whereby JRuby on Windows versus JRuby on Unix are handling line terminators differently; basically, we always act like Unix, even though files on Windows will have CRLF. So it's more an issue that we need to emulate how Ruby handles line terminators under Windows, rather than reporting a specific platform to libraries and apps.

On 6/30/06, Evan Buswell <[EMAIL PROTECTED]> wrote:
What issues are there for just changing platform to "win32" / "linux" / etc instead of "java"?

I haven't looked into all this, so forgive my ignorance, but hacking a "/dev/null" open to a custom IO call just seems like fixing what isn't the problem.  Rails checks the platform and opens the right file accordingly, but we give it the "wrong" platform.

Couldn't this also make steps towards fixing the LF vs CRLF problem?

Evan


On 6/30/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:
On Fri, 30 Jun 2006, Thomas E Enebo defenestrated me:
> (though it is still outputting requests to stdout which I think should
> be in the log file -- so even with these fixes that did not straighten
> out).

  I take this back...it works the same as Ruby....

-Tom

--
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel



--
Evan Buswell
[EMAIL PROTECTED]

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel





--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to