Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Problems with rebol startup (CGI) Re:

From: rebol:techscribe at: 19-Sep-2000 14:31

Hi Tim, my book doesn't cover View (and therefore contains no information about that monster known as the Windows registry ;-). Recall that /Core does not use the registry! I tried simulating your problem using the Windows run dialog box (Start button -> Run) instead of using a Web Server (i.e. CGI program). The purpose is to determine if the behavior you observed has to do with REBOL and the registry, or whether it has to do with how REBOL is executed by the Web server you are using at the time REBOL gets called in your CGI script. If you duplicate the following steps do you get the same results? (My REBOL_HOME environment variable BTW is set to my /Core directory, not the /View directory. The user.r file I modify in the following steps is in /View's directory, because /View is associated with .r files in the Windows registry, not /Core.) 1. My .r files are associated with REBOL/View in the registry. (View did that automatically during installation). 2. I added a line to the user.r file in the View directory that displays print "this is user.r" 3. I saved a REBOL script to my \temp directory. This script simply contains the two lines ask "Whazzzup? " halt 4. I brought up the Run dialog (Start -> Run ...) and entered d:\temp\test.r. 5. Then I clicked OK. 6. The REBOL shell was started. 7. The REBOL shell correctly displayed this is user.r whazzzup? end then closed once I hit return. This means that when REBOL/View was launched by MS Windows because it is associated with .r files in windows registry, View first processed the user.r file in its startup directory, and then proceeded to process the test.r file in the \temp directory as expected. At 12:40 PM 9/19/00 -0800, you wrote:
>Hi John: >Thanks!! More below.... > >> Hi Tim, >> Have you tried setting the environment variable REBOL_HOME="c:\program >> files\rebol" ? > >Yes. Works for command line. > >> Rebol will alsp pick up a user.r from the current directory. >> cheers, john > >And I find this also to be true for command-line scripts, >however when I run cgi script >from a directory with user.r present in that directory, it doesn't >seem to be evaluated. > >value data in the registry is set to: >C:\Program Files\View\rebol.exe -cs %s >And cgi scripts work fine. > >Do I perhaps need to add user.r there? > >I'm nervous about trying it so faor because >I don't like to do anything in the registry >without being thoroughly informed. > >Any other ideas? > >And I'm going to check Elan's book.... :) >Regards >Tim > >> > >> >> Hi: >> It appears that user.r is not evaluated by rebol unless rebol >> is started from the home directory. >> >> To clarify : >> >> 8<-- >
;- Elan [ : - ) ] author of REBOL: THE OFFICIAL GUIDE REBOL Press: The Official Source for REBOL Books http://www.REBOLpress.com visit me at http://www.TechScribe.com