tag:blogger.com,1999:blog-19239047.post113814091448257844..comments2023-09-18T15:27:03.004+00:00Comments on made of stone: Rails on IIS revisitedBazhttp://www.blogger.com/profile/08540002478471101536noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-19239047.post-71529499460546947302008-06-15T07:56:00.000+00:002008-06-15T07:56:00.000+00:00Good Job! :)Good Job! :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-71649287633234621332007-05-29T23:30:00.000+00:002007-05-29T23:30:00.000+00:00Thanks for the article, this helped heaps.I have h...Thanks for the article, this helped heaps.<BR/><BR/>I have have detailed my experiences, with tips on finding permissions issues at <A HREF="http://mspeight.blogspot.com/2007/05/how-to-run-multiple-rails-apps-under.html" REL="nofollow"> <BR/>How to: Run Multiple Rails Apps under IIS using fast Cgi</A>Murray Speighthttps://www.blogger.com/profile/15535471089184667852noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-77529037315608619152007-03-16T11:27:00.000+00:002007-03-16T11:27:00.000+00:00Just a note for people who are trying to suss out ...Just a note for people who are trying to suss out dispatch.fcgi errors. I have Rails running on an IIS5.0/Win2k server and everything works perfectly when I install my rails app locally on a server drive. However, if I install the app on a network drive, it appears that the credentials that allow it to work on the local drive get dropped and cause the infamous "unable to connect to the fastcgi server" error because the system sees the request as anonymous, which our network doesn't allow.<BR/><BR/>I believe this is happening at the rewriter level from some of my research. Some commercial rewriters support the passing along of windows credentials, but I haven't had a chance to see if that solves the problem for me.<BR/><BR/>I know you haven't had a chance to work on Rails on IIS in a while Baz, but I just wanted to say thanks, it was an excellent helper in my testing.Brandthttps://www.blogger.com/profile/05723110620463117270noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1164021839181934612006-11-20T11:23:00.000+00:002006-11-20T11:23:00.000+00:00I'm guessing a bit but have you tried the fastcgi ...I'm guessing a bit but have you tried the fastcgi permissions thing in one of the comments above?Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1163717783268894602006-11-16T22:56:00.000+00:002006-11-16T22:56:00.000+00:00I'm trying to get Rails working on IIS 5.1 on WinX...I'm trying to get Rails working on IIS 5.1 on WinXP. I'm quite close, I actually have IIS talking to dispatch.fcgi, but I always get rails' "Application error" 500 message when I hit URLs that map to my rails app.<BR/><BR/>Yes, everything works properly in webrick. Note that I also get a 500 when I run dispatch.fcgi from the command-line.<BR/><BR/>Any suggestions for routes of attack for debugging this problem?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1162471952794636682006-11-02T12:52:00.000+00:002006-11-02T12:52:00.000+00:00It would appear that the server I used to test all...It would appear that the server I used to test all this FastCGI stuff has been "decommisioned". It may take me a while to get a new one going. Sorry.Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1162468204470883462006-11-02T11:50:00.000+00:002006-11-02T11:50:00.000+00:00just read that MS is currently working on their o...just read that MS is currently working on their own fastcgi component.<BR/><BR/>see http://www.iis.net/default.aspx?tabid=1000051<BR/><BR/>only a technical preview which doesnt look like its ready for rails yet but promising.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1162383643141226102006-11-01T12:20:00.000+00:002006-11-01T12:20:00.000+00:00exactly. all non-ajax links work fine.really weird...exactly. all non-ajax links work fine.<BR/>really weird. i'm pretty much stuck now after i even tried giving "everyone" full access to the involved files/direcories as a last resort. (at least all i could imageine, the appdir, sessiondir, even the full ruby dir).<BR/><BR/>would be great if you could do a quick check if it works for you by unticking the anonymous access. (provided you have a machine to test with at your hand)<BR/><BR/>thanks alot!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1162377462751299992006-11-01T10:37:00.000+00:002006-11-01T10:37:00.000+00:00It's working OK for none-AJAX links but not for AJ...It's working OK for none-AJAX links but not for AJAX ones? Strange - not something I've ever seen (but I'm not really using authentication).Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1162306903036155622006-10-31T15:01:00.000+00:002006-10-31T15:01:00.000+00:00Hi!thanks for this great howto.but currently i'm s...Hi!<BR/><BR/>thanks for this great howto.<BR/>but currently i'm stuck with a a strange problem involving ajax.<BR/><BR/>when trying to update iformations using "link_to_remote" i'm getting the login dialog over and over again, and it won't let me authenticate there.<BR/><BR/>i guess there are more files i need to set proper permissions. but i have no idea on what files.<BR/><BR/>anyone else having this problem or even a solution?<BR/><BR/>thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1159165721044733322006-09-25T06:28:00.000+00:002006-09-25T06:28:00.000+00:00Hi,I used Rodolfos tutorial and it worked very wel...Hi,<BR/><BR/>I used Rodolfos tutorial and it worked very well. <BR/><BR/>I kept getting the dreaded "Server Error, unable to connect to fastcgi server" error. Apparently the user running the IIS instance (IWAM_OTER in my case - OTER is the name of my machine) didn't have permission to access the following files:<BR/><BR/>C:\ruby\lib\ruby\site_ruby\1.8\fcgi.rb C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt\fcgi.so<BR/><BR/>when I fixed this everything worked.<BR/><BR/>Hope this helps someone else.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1154719192486764202006-08-04T19:19:00.000+00:002006-08-04T19:19:00.000+00:00Hi there people! I've post a portuguese version/ad...Hi there people! I've post a portuguese version/adaptation of this tutorial available in my <A HREF: HREF="" REL="nofollow" HTTP://BLOG.RODOLFOLUZ.NET/POST/SHOW/11>my blog</A>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1150323748480363972006-06-14T22:22:00.000+00:002006-06-14T22:22:00.000+00:00If you run the following command line from the pub...If you run the following command line from the public folder and get the following error:<BR/><BR/>`const_missing': uninitialized constant RailsFCGIHandler (NameError)<BR/><BR/>Then one of the possible error may be that the RubyForIIS installer has placed some files in the wrong folder. Look for a subdirectory called 'RubyForIIS' somewhere in the c:\ruby folder. you will need to copy all contents to the C:\ruby\lib\ruby\site_ruby\1.8 folder.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1148496393048183842006-05-24T18:46:00.000+00:002006-05-24T18:46:00.000+00:00You're right Doug - totally forgot to mention it. ...You're right Doug - totally forgot to mention it. You should be able to install it at any time after your Ruby installation. I will update the main article when I get the chance.Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1148418061054698182006-05-23T21:01:00.000+00:002006-05-23T21:01:00.000+00:00I'm trying to go over your instructions again, and...I'm trying to go over your instructions again, and one thing I don't see (perhaps I'm just missing it) is when to install Ruby for IIS. I don't know if this matters.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1148026849751049702006-05-19T08:20:00.000+00:002006-05-19T08:20:00.000+00:00Sorry Doug, I don't know. It all looks OK to me ....Sorry Doug, I don't know. It all looks OK to me ...Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147786943117576342006-05-16T13:42:00.000+00:002006-05-16T13:42:00.000+00:00Here's the contents of IsapiRewrite4.ini (which is...Here's the contents of IsapiRewrite4.ini (which is in the app/public directory, along with IsapiRewrite4.dll):<BR/><BR/># Ruby on Rails<BR/>IterationLimit 0<BR/>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147767760075113362006-05-16T08:22:00.000+00:002006-05-16T08:22:00.000+00:00What's your rewrite rule? I think it is splitting...What's your rewrite rule? <BR/><BR/>I think it is splitting the ruby command line into two parts when they need to be glued together with a query string (see Chris Lang's comments).Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147463726448469412006-05-12T19:55:00.000+00:002006-05-12T19:55:00.000+00:00I'm on Windows Server 2003. However, I am running ...I'm on Windows Server 2003. However, I am running multiple sites on the box - one ASP.NET and one regular ASP. The sites share an IP address and are distinguished by a load balancer using ports. <BR/><BR/>I have experimented with moving the Ionic Rewriter DLL around. I put it in the D:\MyApp\public directory, along with the INI file, for now.<BR/><BR/>Using FilemonNT, I can see that when I try to access the homepage (which returns a Directory Listing Denied error), that the request is being passed to w3wp.exe and that the path is D:\MyApp\public. When I try to request an interior page (like MyApp/events), the request is being passed to the rubyw.exe process and the path is D:\MyApp\public\dispatch.fcgi. This returns the "Server Error, unable to connect to fastcgi server." error.<BR/><BR/>In the IIS log, I see the following: <BR/><BR/>#Date: 2006-05-12 19:39:16<BR/>#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status <BR/>2006-05-12 19:39:16 [ip] GET / - [port] - [ip] Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) 403 14 5<BR/>2006-05-12 19:39:25 [ip] GET /dispatch.fcgi /events [port] - [ip] Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) 200 0 0<BR/><BR/>The fastcgi.crash.log shows the following: <BR/><BR/>[12/May/2006:10:53:55 :: 3712] Ignoring unsupported signal USR1.<BR/>[12/May/2006:10:53:55 :: 3712] Ignoring unsupported signal USR2.<BR/>[12/May/2006:10:53:55 :: 3712] Ignoring unsupported signal HUP.<BR/>[12/May/2006:10:53:55 :: 3712] Ignoring unsupported signal SIGTRAP.<BR/>[12/May/2006:10:53:55 :: 3712] starting<BR/>[12/May/2006:10:53:55 :: 3712] terminated gracefully<BR/><BR/>When I try running ruby dispatch.fcgi from the command line, I see the code for the 500.html page I have set up.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147436786096101222006-05-12T12:26:00.000+00:002006-05-12T12:26:00.000+00:00Well, that error: "Server Error, unable to connect...Well, that error: "Server Error, unable to connect to fastcgi server." I've never solve it on Windows 2000.<BR/>On that time I was trying to setup Rails on IIS on a Windows2000 Server. Because it was not my machine, some guy must have changed something on it before, that messed up everything so i could not setup Rails on IIS correctly. (I believe it has something to do with users permissions)<BR/><BR/>After that, they'd passed me a new, untouched pc (Windows 2003 Server). Then, your tutorial worked perfectly on the first try.<BR/><BR/>Well we've gotta know which OS our brother Doug is using.<BR/>Your last comment is a good way to test the FastCGI. Although I usually test my FastCGI via browser, putting on the url: http://localhost/dispatch.fcgi?controller/action<BR/>it should give some answer...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147422061790569962006-05-12T08:21:00.000+00:002006-05-12T08:21:00.000+00:00Make sure you have Ruby for IIS installed correctl...Make sure you have Ruby for IIS installed correctly. <BR/><BR/>Check your FastCGI configuration for typos in the parameters. <BR/><BR/>Make sure that your sessions are configured correctly. <BR/><BR/>Make sure you have the MS Visual C runtime DLL installed (http://made-of-stone.blogspot.com/2006/04/getting-weird-fastcgi-errors.html). <BR/><BR/>Try running dispatch.fcgi from the command line (move to myapp/public and "<I>ruby dispatch.fcgi /controller/action/id</I>") - normally it should say internal server error but it may say something else that could help pinpoint the problem.Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1147298728150378412006-05-10T22:05:00.000+00:002006-05-10T22:05:00.000+00:00I am experiencing the same error as Rodolfo (which...I am experiencing the same error as Rodolfo (which he apparently solved) - I'm getting "Server Error, unable to connect to fastcgi server." <BR/><BR/>However, unlike Rodolfo, I haven't been able to solve it on my own. I have added write permission to D:\Temp for the IIS_WPG group and for the IWAM user in that group with no luck. Any suggestions would be appreciated.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1146731377621424662006-05-04T08:29:00.000+00:002006-05-04T08:29:00.000+00:00Sorry - at the moment I don't have the resources. ...Sorry - at the moment I don't have the resources. Windows only at work, Mac only at home and the only Linux I have access to is a shared hosting account somewhere on a server in California. <BR/><BR/>When I get my Intel Mac (he says staring wistfully at the pennies in his pocket) I will do some sort of comparison ...Bazhttps://www.blogger.com/profile/08540002478471101536noreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1146695720795526292006-05-03T22:35:00.000+00:002006-05-03T22:35:00.000+00:00I would be interested to see side by side performa...I would be interested to see side by side performance tests comparing various Rails setups such as the following.<BR/><BR/>1) IIS\FastCGI (Windows)<BR/>2) Apache\FastCGI (Windows)<BR/>3) Apache\FastCGI (Linux)<BR/>4) Apache\CGI (Linux)<BR/>5) Lighttpd\FastCGI (Linux)<BR/><BR/>Get the same app running on all.<BR/><BR/>If this has been done already, would somebody please post it here. If not, Baz, you should organize this!<BR/><BR/>Or for those other bloggers, set this up and it would be sure way to get traffic to your site within the Rails community.<BR/><BR/>JeffAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-19239047.post-1146240644984651312006-04-28T16:10:00.000+00:002006-04-28T16:10:00.000+00:00has the ActionController::Base.asset_host setting ...has the ActionController::Base.asset_host setting been set correctly in environment.rb?Anonymousnoreply@blogger.com