Ruby complete newbie here. I wanted to try out Jekyll from recommendation here
I am running macOS 10.12.4, system version of Ruby is ;
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
Based on above guide i followed steps:
installed homebrew (1.2.2)
installed RBENV via homebrew (v 1.1.0)
rbenv install 1.9.3-p551
cd into your project directory and run rbenv local 1.9.3-p551
ruby versions
system
1.9.3-p551 (set by /Users/me/jekyltest/.ruby-version)
However when I do gem install bundler, I get: ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
I’ve googled but finding various solutions and don’t know which is the right one.
I’ve previously installed fastlane via sudo as per their recommendation, but now reading that using sudo isn’t good. I’m not sure if i can clean out installed gems without breaking something in macOS, but I like the idea of it all being self contained within rbenv.
Any recommendations to get around the permissions issue and properly install bundler for use with rbenv?
If you are having issues, getting frustrated, and you start installing and uninstalling the rbenv, it will be hard for the community to help. I’m saying this because some times, after you run the command $ rbenv global 2.4.1, you won’t see the version taking effect until you restart the terminal or source your either bashrc, zshrc, or other shell you are using. I recommend to uninstall rbenv and follow the steps again. After you finish just restart your terminal and run rbenv version command… You should have 2.4.1. Hope this helps.
1.9.3-p551 (set by /Users/me/Documents/work/jekyltest/.ruby-version)
2.4.1
bundler version:
Bundler version 1.15.1
rbenv version
1.9.3-p551 (set by /Users/me/Documents/work/jekyltest/.ruby-version)
then, when I call bundle install --without heroku I get:
An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.3.18' succeeds before bundling.