Jump to content

Recommended Posts

Posted

I have a Rails app running at https://bobrock.heliohost.us/home that does just fine in development mode. But when I switch to production mode the site will no longer load. Of course, in production mode, I can't see whatever error is causing the problem.

On my local machine, I can switch between development and production without any problems, but I had to add 

config.hosts << "localhost"

to the `production.rb` local environment file to make it work.

I added 

config.hosts << "bobrock.heliohost.us"

to the `production.rb` remote environment file, but that didn't clear the error.

What else should I try to get things running in production mode?

Posted

This is a Krydos question. Basically nobody else uses RoR, support for it is rather new, and there is no log available on your end if you set it to production.

Posted

Here's your error on production

App 3001142 output: Error: The application encountered the following error: Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)

Maybe this will help? https://stackoverflow.com/a/51467308

Posted

Thanks, Krydos! That was exactly the clue I needed. It 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.

  • Like 1
  • Krydos changed the title to [Solved] Rails app works in development mode but not in production mode
  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...