在heroku上使用rails和omniauth编译失败
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `[]' for nil:NilClass
remote: /tmp/build_f21d4b6cc71ba2ef116eca0b20a72d4b/config/initializers/devise.rb:263:in `block in <main>'
remote: /tmp/build_f21d4b6cc71ba2ef116eca0b20a72d4b/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise.rb:311:in `setup'
remote: /tmp/build_f21d4b6cc71ba2ef116eca0b20a72d4b/config/initializers/devise.rb:5:in `<main>'
我按照设计 .rb 到 263,这是我添加 twitter omniauth 的地方
config.omniauth :twitter, Rails.application.credentials.twitter[:app_id], Rails.application.credentials.twitter[:app_secret]
我将我的凭据存储在 config/credentials.yml.enc