Question

I am trying to configure my app for uploading images with carrierwave/fog/AWS. I ran the following command in my terminal and need to reset it to the default setting. I've searched documentation but cannot find anything on this topic. Any ideas? The command I ran (that I'd like to take back) was

heroku config:set S3_BUCKET_NAME="simple-toy-#{Rails.env}"

In my carrier wave upload initializer I have the fog directory set as what's shown below :

config.fog_directory  = "simple-toy-#{Rails.env}"
Was it helpful?

Solution

heroku config:set just sets an environment variable on heroku.

There is no default value for S3_BUCKET_NAME. So, if you have overwritten a previous value and want to get back to it, you will have to find from some other source what was the value and set it using heroku config:set

If you want to remove current environmental variable (undo your command), you need to do

heroku config:unset S3_BUCKET_NAME

OTHER TIPS

If you just need to remove the value, Victor hit it spot on. In case you need to get back to the old value, there is also an option.

Heroku has "releases", which are created when you push code or config changes. So if you run heroku releases you should be able to see the release when you changed things. If you take the version before that as an argument you can "rollback" to the version, we'll say vXYZ for example, just before the change like so: heroku releases:rollback vXYZ.

You can also learn a bit more about releases and rollback in particular here: https://devcenter.heroku.com/articles/releases#rollback

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top