. Advertisement .
..3..
. Advertisement .
..4..
I got the “You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. ” error when I add gem install bundler
in the Terminal.
Below is the steps that I applied for my specs to install RSpec:
- Run
gem installer
within the directory root of your application. - Run
bundle install
. - To run a single spec file, run a command like this:
bundle exec rspec spec/00_hello_spec.rb
. - To run all specifications at once, execute
bundle execute RSP
You can install ruby that use homebrew
Include
export GEM_HOME="$HOME/.gem"
to the~/.bash_profile
or.zshrc
if zsh is being used in your system.