★実現したいこと
2020年3月現在、Macのローカル環境で【rails -v】を行うと
【rails '6.0.2.1'】がデフォルトとなっています。
アプリケーション作成の都合上、上記を【rails '5.2.1'】にダウングレードする必要がありました。
★試したがうまくいかなかったこと
①gem uninstall rails
②gem uninstall railties -v '6.0.2.1'
①→②の順番で行うも、rails -vするとまだ'6.0.2.1'のまま・・・
★解決策
sudo gem uninstall railties -v '6.0.2.1' --force
上記コマンドを実行したところ、無事Rails6がアンインストールできました。
あとはこれまでと同様の方法で、Rails のバージョンを指定し、インストールするのみです。