Rails 8.0.1 Ruby 3.2.2
I can run my Rails app locally in both development and production mode. On my host I can run it in development mode.
But when I switch the host version to production mode, it won't load.
I was able to get the local production mode running by adding config.hosts << "localhost"
to my production.rb
file. But adding the host to the remote production.rb
file didn't change the problem.
What else should I be looking for?
Rails 8.0.1 Ruby 3.2.2
I can run my Rails app locally in both development and production mode. On my host I can run it in development mode.
But when I switch the host version to production mode, it won't load.
I was able to get the local production mode running by adding config.hosts << "localhost"
to my production.rb
file. But adding the host to the remote production.rb
file didn't change the problem.
What else should I be looking for?
Share Improve this question asked Jan 31 at 17:05 Bob RockefellerBob Rockefeller 4,6063 gold badges31 silver badges35 bronze badges 6 | Show 1 more comment1 Answer
Reset to default 1It turned out that my site was missing the master.key
file, which, of course, was not uploaded as part of my GitHub repo because it's not there for security. Once I manually uploaded that file the site appears to be working now in production mode.
group :production
block. A lack of access to your production is going to be a major headache. Something like Heroku or Digital Ocean costs $5/month and will give you practice on a real production environment. Glad you got it fixed. – Schwern Commented Jan 31 at 22:05