Hatchbox deployment. public/index.html not found
I am deploying to hatchbox and everything appears fine until i load the site up in the browser. Looking at the logs there is no public/index.html. On my development environment there is also no index file in public. I am using Rails 6 which apparently doesn't build a public index.html file?
The Rails root path is what will be rendered first. If that isn't found, it'll fall back and look for index.html in the public folder. Normally you have a Rails root so the index.html would never be used.
Cool can i set this somewhere? My path should be pretty default. Its just app/
You'd define it in
root to: "controller#action"
In development, Rails will show the "welcome to Rails" screen, but in production that disappears and would 404 without a
Ok i made a staging enviroment in my app, which i guess could be the issue. I have environment variables on Hatchbox using staging, rather than p[roduction. I'll dig deeper. Thanks
To run staging on your server, make sure you have RAILS_ENV=staging set in the env vars. 👍