I am learning to code and trying to make the move for a Rails project from a cloud dev environment to a local one on my Mac with OS Sierra. However, I am having trouble setting up my ruby version and installing rails.
I have installed Homebrew which I used to install rbenv. Using rbenv I have installed ruby 2.4.0 and set it to local and global. I can see it in .rbenv/versions, however when I check my ruby version I still get 2.0.0
$ ruby -v ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] When I try and install Rails I get the following;
$ gem install rails ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. I am not sure how I utilize the rbenv ruby version in my system to then install rails.
sudofor that. It looksgem installis trying to install in your system ruby, which you don't want to touch. I can see it in .rbenv/versions,--That isn't a path. What's the part before .rbenv?rbenv init. In other words, did you follow the instructions exactly? Pasting your whole terminal session into your question would allow people to see where you made a mistake.