Last Updated: 2021-05-15
# config/initializers/webpack.rb Webpacker::Compiler.env['FACEBOOK_PIXEL_ID'] = Config['facebook_pixel_id']
Anyway the original key, the bad one, was 11111..., as showed up in the error below:
https://connect.facebook.net/signals/config/1111111111111111?v=2.9.2&r=stable - Failed to load resource: the server responded with a status of 404 ()
But when I changed the key to
22222222, a valid one, I still saw the same error message. (Restarting spring did not help either.)
The trick to solving it was to force webpack to regenerate the assets. I did this by deleting the generated packs in
Watch out for state persisted by web-pack. It can survive server restarts and cause changes in the code not to be picked up.