latazzajones
latazzajones

Reputation: 35

Figaro Gem and Missing `secret_key_base` for 'development' environment

I'm having difficulty getting the figaro gem configured in my app - here's what I have:

The error I'm getting

Internal Server Error

Missing secret_key_base for 'development' environment, set this value in config/secrets.yml WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08) at localhost:3000

gemfile

gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

gem 'figaro'

gem 'flickraw'

application.yml

FlickRaw.api_key: 00000000000etc
FlickRaw.shared_secret: 0000000000etc

development:
  secret_key_base: 0000000000etc

test:
  secret_key_base: 0000000000etc

secrets.yml (I added the env variable to see if that would fix it .. it doesn't make a difference)

development:
  secret_key_base: <%= ENV['secret_key_base'] %>

test:
  secret_key_base: <%= ENV['secret_key_base'] %>

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

I'm grateful in advance for any help ... clearly I'm not implementing this correctly. here's a link to figaro's docs: https://github.com/laserlemon/figaro

Upvotes: 0

Views: 904

Answers (1)

latazzajones
latazzajones

Reputation: 35

It was a typo in the FlickRaw API information. I changes "FlickRaw.api_key:" to "FlickRaw_api_key".

Upvotes: 1

Related Questions