Simple question – I’m trying to assign random values to some of my app’s fields on Heroku by writing:
Project.all.each do |p|; p.key ||= ActiveSupport::SecureRandom.hex; p.save; end
This is producing the internal server error due to the hex.
Do you know why this is happening and how I can fix it?
It turns out the failure was due to an hour-long Heroku outage that killed tools as well as slowing down apps. hex still works on Heroku console.
Thanks leonardoborges and Skydreamer for your help!