Rails with Linode Object Storage: KeyError: Missing configuration
Hi,
I set up Linode Object Storage with Rails ActiveStorage and it seems to work as expected. The files uploaded appear in the Linode bucket and then get served by ActiveStorage.
But I keep getting this error:
KeyError: Missing configuration for the linode Active Storage service. Configurations available for the test, local, and digitalocean_spaces services.
The configuration is present in storage.yml so I'm not sure what configuration the problem comes from. Maybe I configured it wrong? Here is my config:
linode:
service: S3
access_key_id: <%= Rails.application.credentials.dig(:linode, :access_key_id) %>
secret_access_key: <%= Rails.application.credentials.dig(:linode, :secret_access_key) %>
region: default
endpoint: https://us-southeast-1.linodeobjects.com
bucket: ftapp
http_continue_timeout: 0
Any idea what's wrong?
Thanks
2 Replies
Your config looks like it matches other configs that are reported to work for the us-east-1 region.
You could try creating a test bucket in
us-east-1to determine if the working config is region specific. I'm not sure where the "region: default" is coming into play.You may want to check the files in your
config/environments/directory to make sure that yourconfig.active_storage.servicelines are as you expect.Options set in
config/storage/<environment>.ymlfiles will override settings made in yourconfig/storage.ymlfile, so you might want to make sure you are not overriding any needed valuesIf one of your environment files is named
digitalocean_spaces.ymland you have modified it for use with Linode, you may wish to try renaming it in case the file name needs to match the stanza in the config file.