0 votes
by (160 points)

Hang on - our URL is being rewritten with a .fcgi in it - ring any bells? This cleans up Ruby's session recordsdata and prevents too many from being created. The purpose of that is to force Ruby to put its session files right into a identified folder - should you read again via this blog you'll discover that at one point I used to be having unusual behaviour with sessions. Create a key (folder) called "FastCGI". It turns out that as you run below completely different configurations (CGI, FastCGI and WEBrick) Ruby generally places its information in numerous places and you get unpredictable behaviour. Then add a scheduled task to run that batch file every night time at some god-forsaken hour. Now run your application under WEBrick. After a protracted pause (as FastCGI invokes Ruby for the primary time) you should see your application. Ruby for IIS does some patching to Rails and Ruby to permit IIS to route its requests to FastCGI and מפתחי אפליקציות ultimately to Rails. IIS then dispatches this new URL to FastCGI which in turn passes it to Ruby.

FastCGI keeps quite a few Ruby/Rails processes operating inside IIS. I've not quite managed to get web services working over IIS but I reckon I'm not far away - so follow the instructions beneath and I'll update you after we get there. Fire up the trusty pain-in-the-arse Web Info Companies configuration manager. Create a new Internet Server Extension in the IIS Configuration Manager, calling it "MyApp". Subsequent up, פיתוח אפליקציות click "Configuration". Under "Mappings" click on "Add" and select FastCGI.DLL because the executable, .fcgi as the extension (if you are going to have a number of Rails applications on a single server it's good to differ this extension on a Rails-utility-specific basis - for instance .myapp1, .myapp2 etc), פיתוח אפליקציות לאנדרואיד with "All Verbs", "Script Engine" and "Examine that file exists" all selected. Plus it also helps if you want to scrub up your periods (which you will need to do later). URL rewriter will spot the '.' and will not feed the request to Rails in any respect.

Be careful, the Ionic Rewriter DLL and INI file must stay in the same folder. The Ionic Rewriter takes a Rails-pleasant url (controller/action/id) and rewrites it into a form that IIS understands. This is vital. If it would not work here it definitely won't work under IIS. But I've not performed it so I won't go on about it right here. I am not 100% positive what's going on here. The directions here are for establishing one site on the "Default Net Site" - I don't think it will be too onerous to set up multiple Rails sites on one IIS site and even simpler to arrange multiple IIS websites, every containing a single Rails site. InetPub - they are associated with IIS but not out there to the general public. Easy stations with bus-cease-like ready shelters may be low-value, useful, and adequately enticing to the public. Public because the local path.

Open RegEdit and open the Local Machine/Software program key. In Regedit you may immediately enter the value for binaries by typing in the fitting hand facet of the edit box - you don't want to convert every character into Hex, like I did the primary time I was confronted with this editor! You will need to create a Temp folder on D: or your application will silently fail to work. That is why, מחיר לפיתוח אפליקציות when we've got a number of applications on a single server, we need to vary the file extensions (.myapp1, .myapp2 as detailed above - likewise we have to rename dispatch.fcgi to dispatch.myapp1/dispatch.myapp2 for every respective application). After all, ideally, בניית אפליקציות you'd study the final-modified-time and only delete people who hadn't been touched in twenty minutes, or whatever, however, for my utility a minimum of, עלות פיתוח אפליקציות getting rid of all of yesterday's classes is good enough. Good job spreading awareness! Right-click on on your "Default Web Site" and select "Properties".

If you are organising a web-service then this has an implication - by default Rails makes the WSDL obtainable via a URL ending in service.wsdl. You've got to permit IIS entry to the executables you are going to be using. This takes the URL that IIS recieves and matches it towards the given common expression. Restart IIS (again .. Name to get the identical result. I will get spherical to it, promise. Now I am betting that you just get a "recognition failed for dispatch.fcgi". AppPath tells FastCGI that we wish Ruby (the "home windows" version that doesn't produce a command line output) to execute our scripts, passing it the Args (our dispatch.fcgi script) as the entry level to the appliance, utilizing the Named Pipe "MyAppRailsCGI" to communicate. That's right, next up we configure FastCGI. What we've not accomplished is tell Ionic or FastCGI how one can behave. This tells FastCGI how many copies of Ruby to start initially (I tend to use 5), what number of to start out at occasions of excessive load (I tend to use 3) and the utmost variety of Ruby processes to have running at one time (15 in case your server can handle it).

Please log in or register to answer this question.

Welcome to MyQtoA, where you can ask questions and receive answers from other members of the community.