In the process of advancing the Ruby on Rails lesson, I made a mistake in the version to install, so I repeatedly installed and uninstalled each version.
However, I couldn't move forward and tried and errored, but I managed to move forward, so I will describe what to do at that time.
I hope it will be useful for my own memorandum and for someone in need.
In the above article,
rm -fr ~/.rbenv
In the terminal.
For a few minutes after that, I couldn't connect to the internet (due to this command?), But after restarting once, it returned.
cat tmp/pids/server.pid
I entered, but I got an error that the file could not be found, and I did not know the solution, so Deleted the ruby_lessons and rails_lessons folders created by Cyberduck.
After that, "Building a local development environment [mac os version]" of dot installation,
https://dotinstall.com/lessons/basic_localdev_mac_v2
And reinstall the uninstalled app.
https://qiita.com/yoseei/items/8cd10de57bd54093cf18
I wrote in my other article above,
gem uninstall railties -v 'Version to remove' --force
gem cleanup
Execute this and delete each version.
Rails and Ruby versions
rails -v
ruby -v
Check at.
As a result, I was able to clear the part where the error had occurred so far, and I am proceeding with the lesson without any problems so far. (Currently around # 12)
On the way, there is a place to install Rails version with 5.1.3, at that time it can be installed with that version, but when I enter a different command after that, it is overwritten with 5.1.7 for some reason.
So far, the lesson is proceeding without any problem with that version, but I will try to find a way to improve it.
This is the progress report.