Mac Rspec install fail: -bash: rspec: command not found

Viewed 75

I am a newbie and been stuck with this for 2 days; I am about to go crazy. I am starting to learn Ruby and we got to Rspec. I installed Rspec with gem install rspec and everything goes ok, but when I execute which rspec I get nothing returned. When I execute "gem which rspec" I get:

/usr/local/lib/ruby/gems/3.0.0/gems/rspec-3.10.0/lib/rspec.rb

My $PATH is:

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile


export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"

alias laptop='bash <(curl -s https://raw.githubusercontent.com/monfresh/laptop/master/laptop)'

export PATH="$HOME/.bin:$PATH"
export PATH="/usr/local/opt/ruby/bin:$PATH"
export PATH="/usr/local/lib/ruby/gems/3.0.0/gems/rspec-3.10.0/lib:$PATH"

And "which ruby" throws:

/usr/local/opt/ruby/bin/ruby

I took a look at these two posts but had no luck with them Post 1 , Post 2

Any help will be really appreciated!

0 Answers
Related