Question: I am currently using a Macbook Pro running MacOS Mojave 10.14.3. I have recently gotten into ruby programming but find their whole gem package management a little confusing. When i `gem install` a package, it installs it in my `/usr/local/lib/ruby/gems/2.6.0/bin` folder and if I want to execute a gem or get a gem version, for example the `solargraph` gem, I must type a command: `/usr/local/lib/ruby/gems/2.6.0/bin/solargraph -v`. I was wondering if there is way for me to define an alias for the path `/usr/local/lib/ruby/gems/2.6.0/bin` so that I could type something like `gemexec solargraph -v` which would achieve the same result as `/usr/local/lib/ruby/gems/2.6.0/bin/solargraph -v`. Thanks for your help. BTW I am using the ZSH shell.

Answer: 
Do you want to install gulp locally or globally?

**Locally**

`npm install --save-dev gulp gulp-cli` should do the trick. You can then run it using:

* `./node_modules/.bin/gulp`
* `npm run gulp` if you add gulp to the scripts section of `package.json`.

**Globally**

Most likely you have a `$PATH` issue.
Did you check where your global libraries are installed by NPM?

`npm list -g`

Does installing any other global library work, or is it specific to Gulp?

*-- Edit --*

If you are using NVM, you should add the NVM setup to your rcfile (that is, `~/.bashrc`, `~/.zshrc`, `~/.profile` or similar). You can do so by appending these lines to your rcfile.

```sh
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh

```

This will load NVM and update your `PATH` so that your shell is able to find `gulp` (or any other globally-installed program by `npm` or `yarn`).
Try `npx gulp` so that npm using the gulp version that is installed in your dependencies.