Unable to install Rails on Mac Mojave


#1

I’m on the lesson “Your first Rails applications” and stuck on installing Rails as I’m getting this error.

gem install rails
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

I’m on Mac Mojave and followed the instruction step by step until now. And set the default to Ruby 2.6.3 as the instructions said, but I run ruby -v I get the following:

ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]

Does anybody have an idea where I’m going wrong? Any help would be much appreciated.

Thanks a lot!


#2

Seem to have solved by going back to https://www.theodinproject.com/courses/web-development-101/lessons/installing-ruby and following the steps again.

Rails appear to be installed now. :slight_smile: