Ask A Question


You’re not receiving notifications from this thread.

Getting No route matches "index.html.var" errors

Gary asked in General

My Ruby app has been running for the last two months on Hostgator with no issues. I have not changed one line of code.

All of a sudden, on March 9th, trying to access my website using the base URL ( not the actual domain, but I'll use it for this post is throwing the following errors (from /log/production.log)

[4;36;1mSQL (0.5ms)[0m   [0;1mSET SQL_AUTO_IS_NULL=0[0m
Processing ApplicationController#index (for at 2019-03-16 08:10:22) [GET]
ActionController::RoutingError (No route matches "/index.html.var" with {:method=>:get}):

My routes.db file is shown below:

ActionController::Routing::Routes.draw do |map|
map.root :controller => "mylittleapp"
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format' end

My htaccess file is shown below

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ "http\:\/\/127\.0\.0\.1\:12006\/$1" [P,L]

HOWEVER, if I try to access the Ruby app using, then the app is accessible and everything works fine.
Key points:

  1. The website has been working fine for two months and is accessible from the base URL, so I know that Rails was routing it to the correct ActionController.
  2. I have not made any code changes to the site
  3. Something mysteriously changed and now "index.html.var" is being passed in and the Rail Router cannot find a route, so it throws an error and calls 404.html
  4. The actual Ruby app is operational, but just not accessible from its base URL. My suspicion is that Hostgator changed either a .httpd config flag or modified my .htaccess file. Any suggestions on how to resolve this? Thanks
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,453+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.