title: React::ServerRendering::PrerenderError with react prerender: true
body: <p>I am getting following error when I am using <code>prerender: true</code>. I am using <code>react-rails gems</code>
  its working fine with <code>prerender: false</code></p>
  
  <pre><code>var Router = window.ReactRouter.Router
  var Route = window.ReactRouter.Route
  
  var Albums = React.createClass({
  
    render: function(){
      return(
        &lt;Router&gt;
          &lt;Route path="/" component={App}&gt;
          &lt;/Route&gt;
        &lt;/Router&gt;
      )
  
    }
  
  })
  
   Showing /home/rails/work/vijay/react/photo_study/app/views/home/index.html.erb where line #2 raised:
  
  Encountered error "Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." when prerendering Albums with {}
  Object.invariant [as default] ((execjs):21975:16)
  createHashHistory ((execjs):24100:130)
  (execjs):22625:20
  wrapDeprecatedHistory ((execjs):25277:61)
  createRouterObjects ((execjs):25251:23)
  componentWillMount ((execjs):25220:38)
  ReactCompositeComponentMixin.mountComponent ((execjs):7286:13)
  wrapper [as mountComponent] ((execjs):1414:22)
  Object.ReactReconciler.mountComponent ((execjs):5606:36)
  ReactCompositeComponentMixin.mountComponent ((execjs):7301:35)
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:36:in `rescue in block in eval'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:33:in `block in eval'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:75:in `block in lock'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:73:in `Locker'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:73:in `lock'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:32:in `eval'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/server_rendering/exec_js_renderer.rb:23:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/server_rendering/sprockets_renderer.rb:32:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/server_rendering.rb:17:in `block in render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/connection_pool-2.2.0/lib/connection_pool.rb:64:in `block (2 levels) in with'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/connection_pool-2.2.0/lib/connection_pool.rb:63:in `handle_interrupt'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/connection_pool-2.2.0/lib/connection_pool.rb:63:in `block in with'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/connection_pool-2.2.0/lib/connection_pool.rb:60:in `handle_interrupt'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/connection_pool-2.2.0/lib/connection_pool.rb:60:in `with'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/server_rendering.rb:16:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/rails/component_mount.rb:31:in `block in react_component'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/helpers/capture_helper.rb:38:in `capture'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/helpers/tag_helper.rb:106:in `content_tag'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/rails/component_mount.rb:44:in `react_component'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/react-rails-1.5.0/lib/react/rails/view_helper.rb:21:in `react_component'
  /home/rails/work/vijay/react/photo_study/app/views/home/index.html.erb:2:in `_app_views_home_index_html_erb___821011538__654593158'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/template.rb:145:in `block in render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications.rb:166:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/template.rb:333:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/template.rb:143:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/template_renderer.rb:14:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/renderer.rb:42:in `render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/renderer/renderer.rb:23:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/rendering.rb:100:in `_render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/streaming.rb:217:in `_render_template'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/rendering.rb:83:in `render_to_body'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/abstract_controller/rendering.rb:25:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/rendering.rb:16:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /home/rails/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/core_ext/benchmark.rb:12:in `ms'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:43:in `render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:198:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:117:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:505:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:137:in `process'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionview-4.2.5/lib/action_view/rendering.rb:30:in `process'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal.rb:196:in `dispatch'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_controller/metal.rb:237:in `block in action'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:45:in `serve'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:43:in `block in serve'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `each'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `serve'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:817:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/flash.rb:260:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activerecord-4.2.5/lib/active_record/query_cache.rb:36:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activerecord-4.2.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activerecord-4.2.5/lib/active_record/migration.rb:377:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/reloader.rb:73:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/web-console-2.3.0/lib/web_console/middleware.rb:28:in `block in call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in `catch'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/railties-4.2.5/lib/rails/rack/logger.rb:38:in `call_app'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/railties-4.2.5/lib/rails/rack/logger.rb:20:in `block in call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/tagged_logging.rb:68:in `block in tagged'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/tagged_logging.rb:26:in `tagged'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/tagged_logging.rb:68:in `tagged'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/railties-4.2.5/lib/rails/rack/logger.rb:20:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/activesupport-4.2.5/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/actionpack-4.2.5/lib/action_dispatch/middleware/static.rb:116:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/railties-4.2.5/lib/rails/engine.rb:518:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/railties-4.2.5/lib/rails/application.rb:165:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
  /home/rails/.rvm/gems/ruby-2.3.0@react/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
  /home/rails/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
  /home/rails/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
  /home/rails/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
  </code></pre>