Skip to content

Instantly share code, notes, and snippets.

@rip747
Created March 16, 2019 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rip747/7312267204a3eec951e19e8d62b0dcde to your computer and use it in GitHub Desktop.
Save rip747/7312267204a3eec951e19e8d62b0dcde to your computer and use it in GitHub Desktop.
web.config file for Rails on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add
name="httpplatformhandler"
path="*"
verb="*"
modules="httpPlatformHandler"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
<!--
Obviously you need to change the paths to point to your install of Ruby and your site location
Please note: I would leave stdoutLogEnabled set to `true` until you can see your site, then set
it to false
-->
<httpPlatform
stdoutLogEnabled="true"
stdoutLogFile="F:\websites\iistest\rails.log"
startupTimeLimit="20"
processPath="C:\Ruby253\bin\ruby.exe"
arguments="&quot;F:\websites\iistest\bin\rails&quot; server -p %HTTP_PLATFORM_PORT% -b 127.0.0.1">
<environmentVariables>
<!--
Set the HOME environment variable to the same directory as when your site is.
This will prevent the following error:
HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory (RuntimeError)
-->
<environmentVariable name="HOME" value="F:\websites\iistest"/>
<!-- so you can change the enironment here: development, production, test -->
<environmentVariable name="RAILS_ENV" value="production"/>
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment