below is what I need to do.
To run the specs, you’ll need to install RSpec. First, run
gem install bundlerin the root directory of your project. Then, 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 of the specs at once, run
bundle exec rspec.
So, I typed
gem install bundler in Terminal, and got the error:
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
and this was in the project file in atom
source "https://rubygems.org" gem "rspec", "~> 3.2.0"
My question is:
It seems like terminal is giving me the response because I’m not supposed to change anything on ruby, and I need to
bundle install inside of atom? Could anyone tell me how to use atom or run anything in atom?
Worked for me using the parameter
--user-install running following command:
gem install name_of_gem --user-install
There was one gem I still could not install (it required the Ruby.h headers of the Ruby development kit or something), then I tried the different version managers, but somehow that still did not really work as it was stated in the documentations how to just install and switch (it did just not switch the versions).
Then I removed all the installed version managers and installed afterwards with
brew install ruby the latest version and did set the PATH variable, too. (It will be mentioned after the installation of ruby from brew), which worked.
If you don’t want to run
sudo then install ruby using homebrew
brew install ruby export GEM_HOME="$HOME/.gem" gem install rails
You may want to add
export GEM_HOME="$HOME/.gem" to your
.zshrc if you’re using zsh
Note: RubyGems keeps old versions of gems, so feel free to do some cleaning after updating: