From: Robert Wagner Date: 2003-02-20T22:29:58+09:00 Subject: Re: narf question At 09:40 20.02.03 +0900, you wrote: >It shouldn't make a difference whether you use the narf executable or >not - all that does is wrap the script in a begin/rescue to allow >errors to be reported to the browser. > >So I suspect there is some other problem. The first option you >suggested is the correct one. Except that if you want the messages to >show up on the web browser you need to do: > Web.puts Web['hallo'] > >Could you let me know: > - which version of narf you are using, and > - exactly what the problem or error you are getting is it's version 0.3.4 require 'web' Web.puts "hi" -->error test.rhtml:4: private method `puts' called for Web:Module puts 'hi' -->OK puts Web['hallo'] -->Error test.rhtml:6: undefined method `[]' for Web:Module >I'm not sure anyone has tested Narf with eruby though, so there may be i think nice cgi (narf) plus eruby might be a bright future option for ruby as language for web apps... >some things that need sorting out. The main one is probably that eruby >outputs direct to standard out whereas narf sends its output to a buffer. maybe a buffer-start/ buffer-stop will do like in php, so one can use (default) unbuffered output -robert >Let me know how you get on. > >Thanks, > >-Tom > >On Thu, Feb 20, 2003 at 01:50:25AM +0900, Robert Wagner wrote: > > hi, > > i upgraded my system and now all the wonderful narf Web methods are > > missing. the api seems to have been changed... i don't want to use the > narf > > runner #!/usr/bin/narf since i'm using eruby. > > > > i tried > > > > require 'web' > > > > p Web['hallo'] > > p Web::CGI['hallo'] > > p Web.new['hallo'] > > > > that won't work > > > > what am i supposed to do? i there also a substitute for former > > Web.multiple_params? > > > > -- > > robert wagner . zorz . in berlin > > ~ > > > >