Installing Ruby on Rails



I am currently on this page of the Web Development course:

I am on the step where it asks me to install Ruby on Rails using:
gem install rails -v 5.2.3

I get this on my terminal:
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

What can I do?


What OS are you using?




It means rbenv isn’t setting the ruby version but the system installed ruby is still doing it.

Run curl -fsSL | bash in your terminal and let me know the output.


I’ve got the same problem. I’ve run curl -fsSL | bash

And the output is as follows:

Checking for rbenv' in PATH: /usr/local/bin/rbenv Checking for rbenv shims in PATH: not found The directory/Users/dalijimmysoh/.rbenv/shims’ must be present in PATH for rbenv to work.
Please run `rbenv init’ and follow the instructions.

Checking `rbenv install’ support: /usr/local/bin/rbenv-install (ruby-build 20200224)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK