Continuing from Last time Even if I proceed with the installation of Ruby and Rails, it still doesn't go smoothly. However, this time I had the experience of being frustrated about a year and a half ago, so I am getting the point to some extent.
$ brew install rails
When installed with, the version was 2.5.0. I want to install it around 2.6.0, so upgrade with the following command. For the command below, refer to the record about one and a half years ago. Here
$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
$ rbenv install 2.6.0
$ rbenv global 2.6.0
$ rbenv rehash
$ ruby -v
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin19]
$ gem install rails
I haven't checked the version after the process is completed.
$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
$ sudo gem install rails
Password:
Successfully installed rails-6.1.0
1 gem installed
$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
It seems that you are told to do Sudu, so it makes you think that Sudu was activated and succeeded, After checking the version, repeat doing Sudu again.
I will refer to this blog and resolve it. What to do if Rails is not currently installed on this system even though rails is installed
$ export PATH="$HOME/.rbenv/shims:$PATH"
$ rails -v
Rails 6.1.0
It will be OK for the time being.
Recommended Posts