react-rails icon indicating copy to clipboard operation
react-rails copied to clipboard

react_component not rendering on production mode

Open superdev093 opened this issue 5 years ago • 3 comments

Help us help you! Have you looked for similar issues? Do you have reproduction steps? Contributing Guide

Steps to reproduce

(Guidelines for creating a bug report are available here)

Expected behavior

Tell us what should happen

Actual behavior

Tell us what happens instead

System configuration

Sprockets or Webpacker version: 4.2.2 React-Rails version: 2.6.1 Rect_UJS version: 2.6.1 Rails version: 4.2 Ruby version: 2.5.3


On development version i can see

react_component("History", {}, {prerender: false})

but on production mode not showing anything without any error.

superdev093 avatar Jul 06 '20 03:07 superdev093

I was facing the same issue, try to remove {prerender: false} and add ReactRailsUJS.mountComponents() at the end of app/javascript/packs/application.js

LuisErnestoZamb avatar Jul 26 '20 06:07 LuisErnestoZamb

This same thing is happening to me. This little app https://github.com/TylerSustare/dinner/tree/react-rails-does-not-run-in-prod-mode only has one view and this happens with rails s -e production image

logs

$ rails s -e production
=> Booting Puma
=> Rails 6.0.3.2 application starting in production
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.3.5 (ruby 2.7.1-p83), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

TylerSustare avatar Aug 24 '20 04:08 TylerSustare

Hi, that log doesn't match with the image, I believe that you should review carefully your logs or change the verbosity of this. Regards,

LuisErnestoZamb avatar Aug 30 '20 04:08 LuisErnestoZamb

We have had no updates on this since 2020. Closing the issue. Feel free to reopen it.

alkesh26 avatar Nov 09 '22 10:11 alkesh26