[racket] raco exe difficutly with Release 5.3.1 & stateless web server

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Jan 28 08:30:06 EST 2013

It would be very helpful to run the exe from the Windows command line
and send me the output. My guess is that it opens, displays an error,
and then closes. If you ran from the shell, you'd be able read the
error. My guess is that the error will say that some file can't be
opened that is part of the configuration of the Web server and I
haven't properly communicated its need to the exe builder.

Jay

On Sat, Jan 26, 2013 at 10:02 PM, Galler <lzgaller at optonline.net> wrote:
> Hello,
>
> I encountered difficulty compiling a #lang web server application after
> upgrading to v.5.3.1 from v5.3 last night. O/S is WinXP service pack 3
>
> The executable would compile into an .exe file.
>
> But when run,  a console window would briefly open then close.
>
> The program did not execute.
>
> I was able to reproduce the bad behavior with the following minimal source
> code, and the following raco script, which appear below.
>
>
> I further note that the minimal program can be successfully run in DrRacket,
> and can be compiled and run *without* encountering the problem by adding the
> -l launcher flag to the raco script. Successful execution results in a
> browser window opening with 'hello world' appearing in the loaded document.
>
> Any guidance would be sincerely appreciated.
>
> Thanks
>
> Zack
>
>
> ;START RACO SCRIPT
>
> raco exe simplest-raco-failure.rkt
>
> ;END RACO SCRIPT
>
>
> ;START SOURCE CODE
>
> #lang web-server
>
> (require  web-server/servlet-env)
>
> (define (start request)
>   (let ((response-generator (λ (make-url)
>                               (response/xexpr `(html (head )
>                                                      (body "hello
> world"))))))
>     (send/suspend/dispatch response-generator)))
>
>
>
> (serve/servlet start
>                #:stateless? #t
>                #:launch-browser? #t
>                #:connection-close? #t
>                #:quit? #f
>                #:listen-ip #f
>                #:port 8000
>                #:servlet-path "/")
>
>
> ;END SOURCE CODE
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.