Previous Next

Thread: Having trouble setting up RoR, FastCGI and Longhorn Beta 3

Last post 09-01-2007 1:36 PM by zopal. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 08-17-2007, 6:20 AM

    • DerekK19
    • Not Ranked
    • Joined on 08-17-2007, 10:05 AM
    • Auckland, New Zealand
    • Posts 8
    • DerekK19

    Having trouble setting up RoR, FastCGI and Longhorn Beta 3

    Longhorn Beta 3 seems to include fastcgi (iisfcgi.dll I think) and I've followed the 10 step program to installing RoR. However when it comes to setting up the web-site there things under IIS7 are completely different to IIS6.

    Has anyone had any success getting RoR running under IIS7. The best I've had has been under Vista - a General Silliness error, even with TP2.

    Thanks for any help
    Derek

  • 08-17-2007, 11:47 PM In reply to

    • mvolo
    • Top 10 Contributor
    • Joined on 09-17-2003, 1:48 PM
    • Philadelphia, PA
    • Posts 583
    • mvolo

    Re: Having trouble setting up RoR, FastCGI and Longhorn Beta 3

    Hi Derek,

    The steps on my blog are for IIS6 only unfortunately, there are a couple of issues that prevent RoR from working on Vista / LHS FastCGI.  It is missing the extra support we added to the IIS6 version to allow RoR's "serve the static file if there, otherwise serve the Ruby script" functionality. 

    However, you should be able to set up the Vista/LHS version of FastCGI to request your RoR controller script directly.  Can you post the error you are receiving so we can take a look at it?  If you need help getting to the detailed error, please see Troubleshoot IIS7 errors like a pro.

    Also, be sure to set up permissions that IIS needs to access Ruby, and Ruby needs to access your application files: give Network Service read/execute access to the directory with Ruby executable, and your Ruby application files.

    Thanks,


    Mike Volodarsky

    Program Manager
    IIS Core Server
    Visit mvolo.com for more inside information on IIS7, IIS and ASP.NET

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 08-18-2007, 3:02 AM In reply to

    • DerekK19
    • Not Ranked
    • Joined on 08-17-2007, 10:05 AM
    • Auckland, New Zealand
    • Posts 8
    • DerekK19

    Re: Having trouble setting up RoR, FastCGI and Longhorn Beta 3

    I've set up error logging as you described then the FREB mechanism as per Bill's blog and got a detailed report. I'll email that to you since it's 82Kb.

    The error indicated an I/O operation failed because of a thread exit or an application request. Not sure what that means. I've added execute access to the handler mapping (RB-iisfcgi). This didn't make a difference. I've added read,list,exec access to 'C:\Program Files\Ruby\*' for Everyone (maybe that's not good practice) and to my inetpub\www\rails folder. Again no difference.

    So then I Edited the RB-iisfcgi Handler Mapping and it wouldn't allow me to save the ruby.exe path until I enclosed it in quotes. I did that and now I get a bad-gateway error (502.2) not general silliness so that's some progress. It's probable that putting Ruby under C:\Program Files was a silly thing to do. Those darn spaces...

    The bad gateway error says the CGI application did not return a complete set of headers so I remembered the comment in your 10 step plan and removed a line from cgi.rb:

    #    if options.delete("nph") or
    #        (/IIS\/(\d+)/n.match(env_table['SERVER_SOFTWARE']) and $1.to_i < 5)
        if options.delete("nph")

    Still no difference, I still get the bad gateway error.

    I'll email you the two error XML dumps, maybe you'll be able to figure our what I'm doing wrong.

    Thanks
    Derek

     

     

  • 09-01-2007, 1:36 PM In reply to

    • zopal
    • Not Ranked
    • Joined on 05-27-2007, 4:15 AM
    • Posts 8
    • zopal

    Re: Having trouble setting up RoR, FastCGI and Longhorn Beta 3

    I'm trying to setup Ruby on Rais on IIS7 FastCGI (LH beta 3) as well, without success.

    I have no idea how to pass arguments to the ruby.exe, that's maybe the part of the problem. If I just add the argument to the handler mapping I get the following error:

    <add name="Ruby" path="*" verb="*" modules="FastCgiModule" scriptProcessor="E:\ruby\bin\ruby.exe E:\ruby\myapp\public\dispatch.fcgi" resourceType="Either" />

    An unknown FastCGI error occured
    Error Code 0x8007010b

    If I just run the ruby.exe:

    <add name="Ruby" path="*" verb="*" modules="FastCgiModule" scriptProcessor="E:\ruby\bin\ruby.exe" resourceType="Either" />

    E:\ruby\bin\ruby.exe - The FastCGI process exited unexpectedly
    Error Code 0x00000001

     

Page 1 of 1 (4 items)
Page view counter