I am trying to run rails on IIS, I followed the steps mentioned here by Scott Hanselman.
Here's some info that might help:
- Rails version: 5.1.4
- Ruby version: 2.3.3
After I followed the setup steps, I countered this issue
HTTP Error 502.3 - Bad Gateway
There was a connection error while trying to route the request.
Most likely causes:
The CGI application did not return a valid set of HTTP errors.
A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
Things you can try:
Use DebugDiag to troubleshoot the CGI application.
Determine if a proxy or gateway is responsible for this error.
Here is my web.config
file content.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform processPath="C:\RailsInstaller\Ruby2.3.3\bin\ruby.exe" arguments=""C:\RailsInstaller\Ruby2.3.3\bin\rails" server -p %HTTP_PLATFORM_PORT% -b 127.0.0.1" startupTimeLimit="200" stdoutLogEnabled="true" stdoutLogFile="rails.log">
<environmentVariables>
<environmentVariable name="RAILS_ENV" value="development" />
</environmentVariables>
</httpPlatform>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" />
</system.webServer>
</configuration>
I am not sure what the problem is, and what configurations I miss!
Error Code
in the 502.3 error page (but not posted as part of this question) is the key to understand the possible cause of failures, as I showed in the blog post halfblood.pro/… The values0x80070002
and0x80070005
are commonly caused by invalid paths and missing permissions. – Okapi