[BUG] Production JS build needs default_url_options
configured
#1091
Labels
bug
Something isn't working
default_url_options
configured
#1091
When I build the assets in production mode on
main
, I get an error unless I add something something likeconfig.action_mailer.default_url_options = {host: 'https://example.com'}
toconfig/environments/production.rb
. This URL is then hard-coded into the built JS for the donation form among other things. If you don't specifyRAILS_ENV=production
, you get thedefault_url_options
fromconfig/environments/development.rb
, which ishttp://localhost:5000
and won't work at all in production.How is this intended to be set up for production? The full URL may be required for things like links in emails if you can't get them from the request, but probably isn't necessary for the JS since it knows where it was loaded from.
Here's the error I got while building the production JS:
The text was updated successfully, but these errors were encountered: