Ruby with IIS6/fastcgi - error 500 without crash.log RRS feed

  • Question

  • User1735808936 posted


    I want to run Ruby on Rails on IIS6 (win2003 sp2). I've made some steps, like:
    - install Ruby,
    - create new test application
    - create new virtual web on port 81 with fastcgi handler (for all requests).
    - give IUSR_* and NETWORK_SYSTEM full rights to directory with generated code
    - I tried to use ruby.exe or rubyw.exe (which is proper?)

    When I run in browser base URL (http://localhost:81/) there is proper answer:

    Welcome aboard

    You’re riding Ruby on Rails ....

    but any other link, like

    fails with error:

    FastCGI Error

    The FastCGI Handler was unable to process the request.

    Error Details:

    • The FastCGI process exited unexpectedly
    • Error Number: -2147467259 (0x80004005).
    • Error Description: Unspecified error

    HTTP Error 500 - Server Error.
    Internet Information Services (IIS)

    There is no fastcgi.crash.log file in log directory, so I don't know what is happening. I tried to give custom path to crash log in dispatch.fcgi script, but with no success.
    Server is very busy while generating above error - it takes about 10 seconds of time and 100% of processor power to finish.

    Any ideas what to check?

    Best regards,


    Sunday, February 27, 2011 6:48 PM

All replies

  • User1735808936 posted

    Hello again.

    I have uninstalled Ruby and installed once again using following steps:

    1. Run rubyinstaller-1.8.7-p334.exe using defaults. Ruby is installed on c:\ruby187\

    2. Install gems:
    > gem install rails -v=2.3.5
    > gem install mongrel
    > gem install sqlite3-ruby
    > gem install mysql

    Installed without problems (previously I have installed newest rails 3, not 2.3.5)
    sqlite binaries downloaded and unzipped to c:\ruby187\bin\

    3. Generate sample aplication:
    > rails myapp
    > cd myapp
    > ruby script\generate controller test

    and add simple print code in controller.

    4. Run mongrel
    > mongrel_rails start

    5. Open browser and run application
    http://localhost:3000 - works
    http://localhost:3000/rails/info/properties - works
    http://localhost:3000/test - index controller
    http://localhost:3000/test/about - about controller

    So, with mongrel it works.
    But I want to use IIS, because on this server there are other applications that require IIS.

    So, I try to use IIS with fastcgi:

    1. fastcgi was already installed

    2. new virtual web using port 81 (to simplify tests) with new application pool

    3. ruby.exe i rubyw.exe added to allowed extensions (just for sure)

    4. configure fastcgi.ini


    5. File dispatch.fcgi was copied from redmine public folder (RedMine is the application I want to finally install and use).

    6. Full permissions added on folder with application for IUSR_* and "network service".

    6. Open browser and run application
    http://localhost:81 - works
    http://localhost:81/rails/info/properties - fails 500
    http://localhost:81/test - fails 500
    http://localhost:81/test/about - fails

    FastCgi crashes with the same error 500 and 0x80004005. Now file fastcgi.crash.log is created (so I have updated subject of this post), but there is nothing interesting in this file:

    [01/Mar/2011:13:20:51 :: 5520] Ignoring unsupported signal HUP.
    [01/Mar/2011:13:20:51 :: 5520] Ignoring unsupported signal USR2.
    [01/Mar/2011:13:20:51 :: 5520] starting
    [01/Mar/2011:13:20:51 :: 5520] stopping gracefully

    The same as previously, generating error 500 takes a while: proces ruby.exe is running for few seconds consuming 100% of processor power.

    Any help?




    Tuesday, March 1, 2011 9:55 AM
  • User-1672167363 posted


    Sorry for late reply,

    Lets start with getting the permissions for accounts corrected. The error "0x80004005" is permissions problem of Create Object.

    For your step 6 " Full permissions added on folder with application for IUSR_* and "network service"."

    You do not need to give full permissions instead just read,execute,list are required to use script & applications.

    Replace with add the IUSR,IUSR_* accounts to the C:\Ruby187\bin folder with read,execute,list permissions.

    Then add the IUSR,IUSR_* accounts to the C:\Windows\Temp directory with read,execute,list,write permissions.

    Using the IIS Manager and permissions for default web server check in Advanced tab for Owner an if Inherit settings

    is used. The Inherit setting controls what permissions are used for a new Web Site creation.

    What you found for Inherit permissions will change the next set of permissions settings.

     A) Using IIS Manager add the IUSR,IUSR_* accounts to the IIS Default Web Site with read,execute,list permissions.

    If the Inherit permissions setting was not selected then each Web Site needs to have per site permissions using A).

    If the Inherit permissions setting was selected then the new Web Sites will have correct permissions.

    If you have made some new Web Sites adjust the permissions using A) to correct the permissions. 

    After changes using IIS Manager restart the server.

    To use FastCGI create a new mapping .rb with a path to "C:\Ruby187\bin\ruby.exe"  "%s %s"

    using verbs of GET,POST,HEAD using script and folder access of type file and allow use with enable. Note the additional macro.

    For information for use of parameter passing with macro for Ruby.exe look at

     Microsoft Support KB2245225  topic  http://support.microsoft.com/default.aspx?scid=kb;en-us;245225 .

      Restart the server for Handler & Mapping changes.

    If you have more errors or questions post to this thread.




    Sunday, March 13, 2011 12:09 AM