Forum Discussion
How to Host a Rails App on IIS: Seeking a Simple Approach
HridayDutta Thanks for your reply ! I tried to make this method working but I got :
HTTP Error 502.3 - Bad Gateway
There was a connection error while trying to route the request.
I've found some examples of web.config for rails on the web (very old), but I'm pretty sure i'm missing something. Here is my configuration :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform stdoutLogEnabled="true" processesPerApplication="1" startupTimeLimit="200" processPath="C:\Ruby32-x64\bin\ruby.exe"
arguments=""C:\Ruby32-x64\bin\puma" -env test -dir c:\inetpub\wwwroot\myapp -p %HTTP_PLATFORM_PORT% -w0"></httpPlatform>
</system.webServer>
</configuration>
Additionnaly, I've found on this https://www.hanselman.com/blog/announcing-running-ruby-on-rails-on-iis8-or-anything-else-really-with-the-new-httpplatformhandler talking about "SysInternals Process Explorer application" that show me processes under IIS and I can see ruby running for a second then disappear. I can't find anything about this have you got an idea ?
Thank you for your help !
- PradeepSharmaOct 01, 2024
Microsoft
It’s always a good practice to check the status of dependent services on your server.
For IIS, you can run the command
IISRESET /status
to view the status of installed IIS services.- Lobby1625Oct 01, 2024Copper ContributorThat's good to know! Thanks for the advice