Issues Deploying Full-stack Rails/React App

Hello there,

I am trying to deploy a web app that has Rails as the backend and React as the frontend.

I followed these instructions for the Rails backend setup: https://render.com/docs/deploy-rails

It worked fine, but it still didn’t load the website’s interface.

So I followed these instructions for the React frontend: https://render.com/docs/deploy-create-react-app

And this part didn’t work. It seems that Render is designed to search for an “index.html” file, but my project has none. My project has an “application.html.erb” file in the backend, and a “webpack.config.js” in the frontend.

The Rails web service is running “application.html.erb” just fine, but when the React static page runs the script “webpack” it doesn’t do what it’s supposed to. It should search for the “root” tag inside “application.html.erb” and deploy the root React component into it, which contains all the UI and components of the website.

Instead, Render is searching for the “index.html” page, which doesn’t exist, since I’m not using Create-React-App and so all it displays on the website is “Not found.”

What am I doing wrong? Is there a workaround?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.