Installing rails


#1

Hello. I have been having difficulties installing rails following the instructions from Step 2.1: Installing Rails and Bundler
gem install rails
I am currently getting an
ERROR: While executing gem … (Gem: : FilePermissionError)
You don’t have write permissions for the /var/lib/gems/2.5.0 directory
I’m new to Ubuntu Linux, please help with instructions to follow


#2

Hi @diggy

It looks like you’ve installed ruby using sudo which has messed up the gem file permissions.

What’s the output of echo $PATH in your terminal?