Forum: Ruby ArgumentError key must be 32 bytes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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
This topic is locked and can not be replied to.