Home>

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: (): did not find expected key while parsing a block mapping at line 1 column 1
Extracted source (around line # 1):

);">
Run with the above code

Supplementary information (FW/tool version, etc.)

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

    YAML syntax error occurred while parsing

    Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (): did not find expected key while parsing a block mapping at line 1 column 1

    So it's a YAML syntax error.
    Please review that first.