Created
March 16, 2019 15:24
-
-
Save rip747/7312267204a3eec951e19e8d62b0dcde to your computer and use it in GitHub Desktop.
web.config file for Rails on IIS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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=""F:\websites\iistest\bin\rails" 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