diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py
--- a/rhodecode/config/environment.py
+++ b/rhodecode/config/environment.py
@@ -82,7 +82,7 @@ def load_environment(global_conf, app_co
 
     config['routes.map'] = make_map(config)
 
-    if asbool(config['generate_js_files']):
+    if asbool(config.get('generate_js_files', 'false')):
         jsroutes = config['routes.map'].jsroutes()
         jsroutes_file_content = generate_jsroutes_content(jsroutes)
         jsroutes_file_path = os.path.join(