Forum: Ruby ArgumentError key must be 32 bytes

042dce9d04049110ade41a56ab09ac9d?d=identicon&s=25 Trung Trungtarn (nhattrungtran)
on 2017-02-11 06:15
I create new application in localhost
Affter run rails generate controller StaticPages home help
I navigate to http://localhost:3000/static_pages/home
1 Error response .
Help me fix please ! thanks all

ArgumentError in StaticPagesController#home
key must be 32 bytes
Extracted source (around line #72):

70 cipher = new_cipher
71      cipher.encrypt
72     cipher.key = @secret
73
74    # Rely on OpenSSL for the initialization vector
75    iv = cipher.random_iv


Rails.root: /home/nhattrung/Working/sample_app
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.