Does local assets precompilation cause a problem for server side rendering a component?
I got strange error. My scenario is:
I have an app locally with react component with prerender: true. In development and production environments it works fine.
When deploy my app to the server I got an error
ActionView::Template::Error (ERROR in SERVER PRERENDERING
Encountered error: “ReferenceError: ReactOnRails is not defined”
This problem appeared when I turn compilation assets to local machine. When it compiles on server it works fine
You probably need to clear out your public /public/assets folder with rake assets:clobber. Generally, you should ONLY run rake assets:compile if you are locally testing your production deploy and then you need to REMEMBER to do the clobber!
What you mean by “Remember to do the clobber”? Im deploying app with capistrano and only one difference from default deploy case is compiling assets locally and pushing it to the server. You mean I have to run rake assets:clobber after rake assets:compile but before rsync it to server? Right?