How to deploy Ruby on Rails app in IIS

Deploying a Ruby on Rails application on Internet Information Services (IIS) can be a bit unconventional, as IIS is typically used with technologies like ASP.NET or PHP. However, it's possible to do so using tools like Helicon Zoo or by setting up a reverse proxy with something like ARR (Application Request Routing). Here's a general outline of how you could approach it:

  1. Install Ruby and Rails: Ensure that Ruby and Rails are installed on the server where IIS is running. You can use tools like RubyInstaller for Windows to install Ruby.

  2. Setup Rails Application: Deploy your Rails application on the server. This typically involves copying your application files to the server and installing any necessary gems using Bundler.

  3. Configure IIS:

    • Install IIS: Ensure that IIS is installed and running on your server.
    • Install Required Modules: You may need to install additional modules like CGI or URL Rewrite depending on your application's requirements.
    • Setup Application Pool: Create a new application pool for your Rails application. Ensure that it's configured to run under an account with appropriate permissions.
    • Create Website: Create a new website in IIS and point it to the directory where your Rails application is located.
    • Configure Handler Mappings: You'll need to configure IIS to handle requests for Ruby files (.rb) using the FastCGI module. This can be done through the IIS Manager UI or by editing the web.config file directly.
    • Set Environment Variables: Configure any necessary environment variables that your Rails application requires, such as database connection settings.
  4. Test Your Setup: Verify that your Rails application is running correctly by accessing it through a web browser.

Up Next
    Ebook Download
    View all
    View all