After upgrading the version of ruby, when I tried rails s, I couldn't use the command.
$ rails --version rbenv: rails: command not found The `rails' command exists in these Ruby versions: 2.6.5
1.gem update --system
2.gem install bundler
3.gem install rails
Type rails -v in your terminal and you should see Rails 5.2.3.