I have been horribly struggling to establish a stable development environment for React and Rails, so much that I am thinking of just trying to run it on a physical Ubuntu machine.
I have started by wasting dozens of hours trying to get Rails/React/Webpacker working. I’ve faced all kinds of problems, which are detailed in this Github issue:
Finally I have decided to give up on Webpacker, and go with Create-React-App and rails.
I have started with this tutorial:
But there are two major problems
– This tutorial assumes a physical machine, and doesn’t cover the getting it to work with Cloud9… dealing with the “ports” issues.
– This tutorial assumes rails API – it proxies certain requests to the API. That’s not what I need to do. I need to run a rails app alongside a React development server… so I can load HTML from both the Rails front end, and have the React JS run on top of Rails.