07-18-2023, 11:59 PM
Brand new Rails application.
Rails version 5.0.0.1, Ruby version 2.4.0preview2.
Create application "demo", run a simple scaffold generate Product, and get an error when trying to view the scaffold's overview page (base index file still loads the Welcome to Rails screen fine):
ArgumentError in ProductsController#index
key must be 32 bytes:
cipher = new_cipher
cipher.encrypt
cipher.key = @secret
# Rely on OpenSSL for the initialization vector
iv = cipher.random_iv
The problem line is apparently cipher.key = @secret.
I've seen various mentions on the github repo for Rails mentioning this issue, but all implied it was now resolved in Rails 5.0.0.1
Rails version 5.0.0.1, Ruby version 2.4.0preview2.
Create application "demo", run a simple scaffold generate Product, and get an error when trying to view the scaffold's overview page (base index file still loads the Welcome to Rails screen fine):
ArgumentError in ProductsController#index
key must be 32 bytes:
cipher = new_cipher
cipher.encrypt
cipher.key = @secret
# Rely on OpenSSL for the initialization vector
iv = cipher.random_iv
The problem line is apparently cipher.key = @secret.
I've seen various mentions on the github repo for Rails mentioning this issue, but all implied it was now resolved in Rails 5.0.0.1