The posted image is saved in the active storage,
The image can be displayed, save the image in S3 of AWS,
I want to be able to display it in the view.
RuntimeError in Items # index
Showing /Users/uraokayuutarou/projects/nostalgia/app/views/items/_item.html.erb where line # 1 raised:
YAML syntax error occurred while parsing
Corresponding source code
/Users/uraokayuutarou/projects/nostalgia/config/storage.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
Extracted source (around line # 1):
What I tried
/Users/uraokayuutarou/projects/nostalgia/config/storage.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (
Extracted source (around line # 1):
);">
Run with the above code
config/envilonments/devlopment
default_url_options [: host] = "localhost: 3000"
The above code is only in the environment where url_option is local
The image may not be saved.
I still don't understand well, but at the terminal,
Run vim ~/.zshrc and export AWS_ACCESS_KEY_ID = "Access key ID value"
export AWS_SECRET_ACCESS_KEY = "Secret access key"
Source ~/.zshrc is running so that you can set and use the added environment variables.
-
Answer # 1
Related articles
- ruby on rails - s3 images are not saved on the ec2 server
- ruby on rails - image cannot be saved (activestorage installed) null in image of table
- ruby on rails - date_select cannot be saved
- ruby on rails - it is not saved in the database after registering the product
- ruby on rails - the image cannot be saved in s3 and cannot be displayed in the view aws :: sigv4 :: errors :: missingcredentials
- ruby on rails - i want to display the posted images in a random order (get information from the record)
- ruby on rails - saved description in nested controller
- ruby - how to upload images directly from rails to s3 on aws
- ruby on rails - [rails] chat function is being implemented jserb file cannot be read
- [ruby on rails 6] i implemented the tag function using acts-as-taggable-on, but i can't jump to the linked article from the list
- ruby on rails - i want to display all the images in the [rails] directory in the browser!
- ruby on rails 5 - some items are not saved in db when posting from rails form
- ruby - not saved with rails new save method
- ruby on rails - not saved by create action
- ruby on rails - rails associated model is not saved in db
- ruby on rails - data cannot be saved in the intermediate table (parameters cannot be passed)
- ruby on rails 5 - scope by specifying conditions for parent-child relationship
- ruby - about implementation of tag function in rails
- ruby on rails uninitialized constant error
- javascript - i want to eliminate error 404
- ruby on rails - rails tutorial chapter 13 cooperation between heroku and aws s3 region
- ruby - how to upload images directly from rails to s3 on aws
- nginx - bundler: failed to load command: unicorn cannot start with an error saying unicorn_rails
- ruby - an error occurred when implementing the micropost search function using ransack
- ruby - resolve rspec mysql foreignkey error
- ruby on rails - s3 images are not saved on the ec2 server
- i can't start mysql on ec2
- ruby on rails - i want to solve the problem that "we're sorry, but something went wrong" is displayed in the productio
So it's a YAML syntax error.
Please review that first.