共享部落版本:
e5a04ab8fc6628bf33d453482433f4a096b356092
环境:
开发中的 Ubuntu 14,生产中的 16.04
服务器模式:
开发和生产也
描述:
在不同的环境中得到不同的错误
重现步骤:
foreman start -f Procfile.static
在开发中给我以下错误
等待 30 秒后,Rails Server JS 包的 Webpack 开发构建丢失:“app/assets/webpack/server-bundle.js”退出并显示代码 1
附加信息
在生产中,我确实遵循了本教程https://github.com/asm-products/lancrapp/blob/master/docs/vps-deployment.md
ActionView::Template::Error (ERROR in SERVER PRERENDERING
App 6284 stdout: Encountered error: "ReferenceError: ReactOnRails is not defined"
App 6284 stdout: when prerendering OnboardingTopBar with props: {"progress":28.57142857142857,"next_step":"slogan_and_description"}
App 6284 stdout: js_code was:
App 6284 stdout: (function() {
App 6284 stdout: var railsContext = {"href":"http://x.x.x.x/","location":"/","scheme":"http","host":"x.x.x.x","port":80,"pathname":"/","search":null,"i18nLocale":"en","i18nDefaultLocale":"en","httpAcceptLanguage":"en-US,en;q=0.8","marketplaceId":2,"loggedInUsername":"loveb","marketplace_color1":"#4a90e2","marketplace_color2":"#2ab865","serverSide":true};
App 6284 stdout:
App 6284 stdout: var props = {"progress":28.57142857142857,"next_step":"slogan_and_description"};
App 6284 stdout: return ReactOnRails.serverRenderReactComponent({
App 6284 stdout: name: 'OnboardingTopBar',
App 6284 stdout: domNodeId: 'OnboardingTopBar-react-component-0',
App 6284 stdout: props: props,
App 6284 stdout: trace: false,
App 6284 stdout: railsContext: railsContext
App 6284 stdout: });
App 6284 stdout: })()