I get an Application error on heroku production.
error contentsIf i check with $heroku run rails console, there is one part that i am interested in. It is less than.
..
..
..
1: from /app/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/configuration.rb:72: in `call'
/app/vendor/bundle/ruby/2.6.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/regional_endpoint.rb:42:in `block in<class: RegionalEndpoint>': Invalid `: region` option was provided. (Aws :: Errors :: InvalidRegionError)
* Not every service is available in every region.
* Never suffix region names with availability zones.
Use "us-east-1", not "us-east-1a"
Known AWS regions include (not specific to this service):
af-south-1
ap-east-1
ap-northeast-1
ap-northeast-2
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-central-1
eu-north-1
eu-south-1
eu-west-1
eu-west-2
eu-west-3
me-south-1
sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
cn-north-1
cn-northwest-1
us-gov-east-1
us-gov-west-1
us-iso-east-1
us-isob-east-1
What I tried
Actually, I set it using Heroku's ENV variable as follows.
$heroku config: set AWS_ACCESS_KEY =
$heroku config: set AWS_SECRET_KEY =<secret key>
$heroku config: set AWS_REGION =<region name>
$heroku config: set AWS_BUCKET =<bucket name>
However, you may have made an inappropriate statement when setting the region. I entered the following.
ubuntu: ~/environment/sample_app (user-microposts) $heroku config: set AWS_REGION = region = us-east-2
From the feeling that I saw the error, I thought that I should have described only the region name as shown below without writing'region ='.
What do you think.
$heroku config: set AWS_REGION = us-east-2
If anyone knows, please help.
-
Answer # 1
-
Answer # 2
Was self resolved. After all, the description of the region was wrong.
How to set the env variable of the region is as I thought$heroku config: set AWS_REGION = us-east-2
Seems to be appropriate.
$heroku config: set AWS_REGION = region = us-east-2
Was inappropriate.
It seems that there are many mistakes. I hope it will be helpful to anyone in the future.
Related articles
- ruby - rails tutorial chapter 13 delete does not work in the test of increasing/decreasing the number of posts with rspec
- ruby on rails - in the rails tutorial (4th edition, chapter 5), the layout of only the login page is broken
- ruby - rails tutorial chapter 2 (6th edition)
- ruby - rails tutorial chapter 4 test fails
- ruby on rails 6 - rails tutorial chapter 14 about follow, unfollow, following? methods
- ruby on rails 6 - rails tutorial (6th edition, chapter 8, list 833) what is the difference between logged_in? and is_logged_in ?
- ruby - i got stuck in chapter 5 of the rails tutorial i want to apply it because applicationhtmlerb is not applied
- ruby on rails 6 - rails tutorial login [remember me] checkbox test
- ruby on rails - mechanism of cooperation between web services and smartphone apps
- ruby on rails 5 - the setup for everyday rails chapter 2 doesn't work (could not find shared context "project setup")
- windows - rails tutorial chapter 13 (1344) image upload in production environment does not work (s3, iam)
- ruby on rails - rails tutorial tests that should pass fail with an error [6th edition]
- ruby on rails - i want to write a rails tutorial test in rspec
- ruby on rails - rails tutorial about git config settings
- cloud9 - rails tutorial chapter 12 problems that rails test does not pass
- ruby on rails - things associated with a foreign key cannot be called in view
- ruby on rails - dealing with wrong number of arguments (given 1, expected 2)
- ruby on rails 6 - environment construction of ruby on rails
- ruby on rails 5 - actioncontroller :: invalidauthenticitytoken cannot be resolved
- ruby on rails - about image distribution on heroku and s3
- windows - rails tutorial chapter 13 (1344) image upload in production environment does not work (s3, iam)
- About errors when running git push heroku master
- ruby - about accelerating heroku's rails app
- ruby - rails app can't deploy to heroku
- mysql - can't db: migrate to heroku
- unable to boot with mysql error number 28 means'no space left on device'!
- ruby - aws deployment the asset "" is not present in the asset pipeline cannot be resolved
- ruby - resource: the server responded with a status of 404 () error
Was self resolved. After all, the description of the region was wrong.
How to set the env variable of the region is as I thought
$heroku config: set AWS_REGION = us-east-2
Seems to be appropriate.
$heroku config: set AWS_REGION = region = us-east-2
Was inappropriate.
It seems that there are many mistakes. I hope it will be helpful to anyone in the future.