Error “uninitialized constant AWS (NameError)”

前端 未结 7 1766
梦毁少年i
梦毁少年i 2021-02-06 21:39

It is saying AWS is uninitialized. I am usign the aws-sdk-core gem.

I tried using the aws-sdk gem instead, and the problem was still there.

This is the initializ

7条回答
  •  醉话见心
    2021-02-06 22:25

    I am not a Ruby expert, but I've solved the same issue by running the below commands.

    To remove the installed AWS gems

    gem list --no-version --local | grep aws | xargs gem uninstall -aIx
    

    To install the v1 gem which was compatible with my Ruby script:

    gem install aws-sdk -v 1.64.0
    

    I agree this is not the recommended way as AWS recommends to use the latest version, but this should be useful for someone who does not want to modify their existing scripts.

提交回复
热议问题