Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError in actionpack-2.3.18/lib/action_controller/session/cookie_store.rb #47

Open
LucasCioffi opened this issue Jul 29, 2017 · 0 comments

Comments

@LucasCioffi
Copy link

LucasCioffi commented Jul 29, 2017

Hi all, I'm seeing this error when deploying to Heroku:

2017-07-27T20:31:51.485945+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-
2.3.18/lib/action_controller/session/cookie_store.rb:194:in `ensure_secret_secure': A secret is 
required to generate an integrity hash for cookie session data. Use config.action_controller.session 
= { :key => "_myapp_session", :secret => "some secret phrase of at least 30 characters" } in 
config/environment.rb (ArgumentError)

But it seems like I have set up config/environment.rb correctly:

# Be sure to restart your server when you modify this file
Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 if defined? Encoding

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.18' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|
  # Settings in config/environments/* take precedence over those specified here.

  config.active_record.default_timezone = :utc

  config.action_mailer.delivery_method = :smtp
  config.action_controller.session = { :key => "_myapp_session", :secret => "somesecretphraseofatleast30characters" }
end
ActionController::Base.cache_store = :file_store, "#{Rails.root}/tmp/cache"

Any suggestions? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant