turn off ruby version warning - ruby

Ubuntu 18.04, ruby 2.6.6
Cron jobs submitted for redmine generate warnings that are then mailed to admin, creating a steady stream of emails every 15 minutes:
Subject: Cron <root#mysys> su -l rubyuser -c " cd /opt/redmine/redmine ; bundle exec rake --trace redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com port=993 ssl=1 username=issueadmin#someplace.com password=pw folder=Inbox move_on_success=Processed project=Issues status=open tracker=Bug priority=Normal >> /opt/redmine/redmine/log/issues.log 2>&1"
The mail contains the usual ruby warning message:
Unknown ruby interpreter version (do not know how to handle): >=2.3.0,<2.7.0ifBundler::VERSION>=1.12.0.
I have tried turning off the warning using
rvm rvmrc warning ignore allGemfiles
su -l rubyuser -c " cd /opt/redmine/redmine ; rvm rvmrc warning ignore allGemfiles"
but it has no effect.
Can someone tell me how to fix this / turn this off?
This is a system-wide ruby, installed at /usr/local/rvm. It appears to be caused by the Gemfile installed at /opt/redmine/redmine, which contains the line
ruby '>= 2.3.0', '< 2.7.0' if Bundler::VERSION >= '1.12.0'
I've tried tweaking that line a bit but I still get the error.

Matthew Boeh gave me the following answer which solves the immediate issue:
It looks like this is an issue with RVM, which tries to read the
Gemfile to determine which version of Ruby to switch to. It's limited
in what it can parse. I believe if you put a .ruby-version or .rvmrc
in that directory it will ignore the Gemfile.
I added "2.6.6" to a .ruby-version for the project.
The reason may be slightly more nuanced, as rvm doesn't consider 2.6.6 an "official" release for some reason, which may be the reason it complains. It does consider 2.7.0 one. At least that's my recollection; don't have access to the machine right now and I would need to install a 2.7 to find out.

Related

Why doesn't RubyMine 2018.2 detect my gems?

I'm trying to debug a Rails project within RubyMine v2018.2 (2018.2.1, 2018.2.4). When I start the editor I get a warning:
RubyMine Gem Manager: RubyMine has detected that some of the gems required for 'project' are not installed.
When I try to run RubyMine's Bundler install command I'm told
bash -c "RBENV_VERSION=2.5.0 /usr/bin/rbenv exec bundle install -V"
Activating bundler (< 2) failed:
Could not find 'bundler' (< 2) among 28 total gem(s)
Checked in 'GEM_PATH=/home/brad/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
To install the version of bundler this project requires, run `gem install bundler -v '< 2'`
...and when I try to run or debug my application from the IDE I'm told "Could not find bundler (version) required by your project-path/Gemfile.lock."
Why doesn't RubyMine detect my installed Gems?
My environment
Ubuntu 18.04.01
zsh 5.4.2
rbenv 1.0.0
rbenv-binstubs # 8ecb7ca8
Rubymine 2018.2.4
I'm using rbenv to manage my Ruby versions. The system has Ruby 2.5.1 installed, but my project depends on 2.5.0. I've set 2.5.0 as the rbenv global version. Configuration for how rbenv chooses a Ruby version seems okay; I get the following results from the noninteractive commands:
> echo $RBENV_VERSION
(no response)
> cat ~/.rbenv/version
2.5.0
> rbenv global
2.5.0
After noticing rbenv wasn't working properly in some RubyMine commands I moved the eval "$(rbenv init -)" setup step from by ~/.zshrc up to ~/.zshenv and ~/.profile so it will also apply to bash and zsh login shells (per guidance here). I'm now getting matching results for interactive and login shells, but still getting unexpected behavior from the Bundle install command within RubyMine.
What is working
My application installs, builds and runs just fine from an interactive shell.
RubyMine's Ruby SDK settings correctly detect rvm and its installed versions, and all of the installed gems for that version.
What I've tried
The output from the bundle install command claims it's running
bash -c "RBENV_VERSION=2.5.0 /usr/bin/rbenv exec bundle install"
When I run this from my interactive shell or with RubyMine's "Run anything" feature (login shell) this command works fine - as does any of the following:
RBENV_VERSION=2.5.0 /usr/bin/rbenv exec bundle install
/usr/bin/rbenv exec bundle install
rbenv exec bundle install
bundle install
So I can't figure out what context RubyMine is using to run this command. It's clear from the error message that the GEM_PATH is incorrect, causing RubyMine to look in the wrong place for bundler, but I don't know where it's getting this configuration. If I bring up the "RubyGems Environment" view in RubyMine I get:
RUBYGEMS VERSION: 2.7.3
RUBY VERSION: 2.5.0 (2017-12-25 patchlevel 0) [x86_64-linux]
INSTALLATION DIRECTORY: /home/brad/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
USER INSTALLATION DIRECTORY: /home/brad/.gem/ruby/2.5.0
RUBY EXECUTABLE: /home/brad/.rbenv/versions/2.5.0/bin/ruby
EXECUTABLE DIRECTORY: /home/brad/.rbenv/versions/2.5.0/bin
SPEC CACHE DIRECTORY: /home/brad/.gem/specs
SYSTEM CONFIGURATION DIRECTORY: /home/brad/.rbenv/versions/2.5.0/etc
RUBYGEMS PLATFORMS:
ruby
x86_64-linux
GEM PATHS:
/home/brad/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0
/home/brad/.gem/ruby/2.5.0
(...)
SHELL PATH:
/home/brad/.rbenv/versions/2.5.0/bin
/usr/lib/rbenv/libexec
/home/brad/.rbenv/plugins/ruby-build/bin
/home/brad/.rbenv/plugins/rbenv-gemset/bin
/home/brad/.rbenv/plugins/rbenv-binstubs/bin
(...rest of PATH...)
----------------------
IDE: RubyMine 2018.2.4, build #RM-182.4505.55
OS: Linux 4.15.0-38-generic[amd64]
Java: 1.8.0_152-release-1248-b8
RubyMine SDK Environment:
Sdk: rbenv: 2.5.0
Sdk Version: ver.2.5.0p0 ( revision 61468) p0
Ruby Interpreter: /home/brad/.rbenv/versions/2.5.0/bin/ruby
RVM Sdk: Rbenv sdk, gemset nullSdk Language Level: 2.5
Sdk Load Path:
~/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib
~/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0
~/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/x86_64-linux
~/.rbenv/versions/2.5.0/lib/ruby/site_ruby
~/.rbenv/versions/2.5.0/lib/ruby/vendor_ruby/2.5.0
~/.rbenv/versions/2.5.0/lib/ruby/vendor_ruby/2.5.0/x86_64-linux
~/.rbenv/versions/2.5.0/lib/ruby/vendor_ruby
~/.rbenv/versions/2.5.0/lib/ruby/2.5.0
~/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-linux
~/.local/share/JetBrains/Toolbox/apps/RubyMine/ch-0/182.4505.55/rubystubs25
Sdk Gem paths:
~/.gem/ruby/2.5.0/gems
~/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/bundler/gems
~/.bundle/ruby/2.5.0/gems
~/.bundle/ruby/2.5.0/bundler/gems
~/.gem/ruby/2.5.0/bundler/gems
~/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems
(full list of gems used for project)
So I think that last bit - "Sdk Gem paths" - might be the problem point, but I don't see any way to configure it.
I'm also already aware of the YouTrack issue "Rubymine 2018.2 release does not take $GEM_HOME environment variable" and don't think it's quite what's happening here. It also claims to be fixed in 2018.3 EAP1, so I installed 2018.3 EAP7 but am still seeing this problem.
I got things working! By signing out and back in. :facepalm:
To be specific, I think the key steps were
Move the $(rbenv init -) step from my .zshrc up to my .zshenv and/or to .profile
Signing out and back in.
The key insight was noticing that ~/.rbenv/shims was missing from the RubyMine Gem Environment despite showing up in both interactive and login shells (in and out of RubyMine), and realizing that while new shells were picking up my .profile changes, RubyMine itself was probably inheriting its environment variables from my session and I'd need to log out/in to to pick up the changes.
I now see ~/.rbenv/shims in my RubyMine Gem Environment, and both the Bundler Install command and my run configurations are working again.
Thank you Casper for pointing me in the right direction!
Been where you are before a bunch of times.
Under the list of scripts you can run, click "Edit Configurations". Should be in the main toolbar.
Double check that you have "Run the script in context of bundle (bundle exec)" checked on the bundler tab. This is SUPER important and is not checked by default. Make sure you check for any rake, rails or irb configurations.
Keep in mind that the run configuration is where you can override the settings for the project. It will create all kinds of problems if this is not set appropriately.
Hope this helps! Bit me a bunch of times.

How to fix "Unknown ruby interpreter version (do not know how to handle): RUBY_VERSION."

Today i just want to setup a jekyll Blog on my Mac, and have already install ruby 2.3.0, but when make '$ jekyll serve', it's error. and show this in terminal:
Error information:
Unknown ruby interpreter version (do not know how to handle): RUBY_VERSION.
So it looks like
bundle exec jekyll new
will create the a Gemfile with the line
ruby RUBY_VERSION
I believe you'll want to edit that file to be e.g.
ruby '2.1.1'
Coincidentally today I am also trying to setup Jekyll and am seeing the same problem. I am using RVM and it otherwise works fine (running multiple Rails dev sites locally). When I run env | grep 'RUBY' I get:
$ env | grep 'RUBY'
MY_RUBY_HOME=/Users/myusername/.rvm/rubies/ruby-2.0.0-p247
RUBY_VERSION=ruby-2.0.0-p247
However, I just continued and ran bundle install, then bundle exec jekyll serve and the site booted up without issue.
Seems like there is no variable RUBY_VERSION in your env.
Try in your shell: env | grep 'RUBY'
Output should be like this:
RUBY_VERSION=ruby-2.3.0
If you don't see anything, you need to reinstall ruby.
Use RVM or other ruby version manager. Here is a good manual
I used to have ruby '~> 2.6.3' in Gemfile and got same warning.
I changed it to ruby '2.6.3' and it fixed it.

Why bundle exec rake does not run to proper version of ruby

I am currently having a strange issue with bundler and ruby.
if I type:
$ which ruby
I get:
/home/martinos/.rubies/1.8.7-p370/bin/ruby
And when I type:
$ which bundle
I get
/home/martinos/.gem/ruby/1.8.7/bin/bundle
But for some reason when I run
$ bundle exec rake db:migrate
The task is run with ruby 1.9.3 (I have written a puts RUBY_VERSION in environment.rb)
Any one as an idea why this happens?
Here is more infos:
When I type:
$ which rake
I get:
/home/martinos/.gem/ruby/1.8.7/bin/rake
But if I
$ head -1 `which rake`
I get:
#!/usr/bin/env ruby1.9.1
There are a variety of pieces that could be in play. The first is that it could be a conflict between your Ruby version management tools and your global gems. Meaning, I suppose it is possible that you only have a Rake version that can work on Ruby 1.9.1 that is in your global set. So when you fire up Rake it is forced to run in Ruby 1.9.1.
What you may want to do is create a directory specific gemset. If you're using RVM you can see the documentation on how to do that by looking at their Gemset documentation. Once that is in place with the Ruby version you want to test with, then do a gem install of Rake at the version that will work with that Ruby version. At that point you should find that the Ruby version being used to run Rake in that directory will be the same as the version you have running.
I apologize if this does not answer your question, or if you have thought of this approach already. Trying to wrap my head around this without the ability to reproduce the problem is a tricky deal.

Why is Ruby bundler (w/ whiskey_disk and RVM) complaining that an installed Gem is not >=0?

This is my error message:
Running rake deploy:post_setup...
rake aborted!
You have requested:
nokogiri >= 0
The bundle currently has nokogiri locked at 1.5.5.
Try running `bundle update nokogiri`
Is this message telling me that 1.5.5 somehow does not meet the ">= 0" requirement? That doesn't sound right.
If I am interpreting this wrong, how should I interpret it?
(Ruby is jruby-1.6.7.2, bundle is 1.1.4. This rake task is actually run via whiskey_disk, if that's important.)
== EIGHT MONTHS LATER ==
I'm finding the same error. Again, trying to use whiskey_disk, so I suspect this is whiskey_disk-related.
This time, it's with the bcrypt gem.
3052 ~/dev/myproj$ bundle exec wd setup --to=grant
Deploying grant#<myserver>.com...
grant#<myserver>.com's password:
Repository already cloned to [/home/grant/myproj]. Skipping.
Running rake deploy:post_setup...
rake aborted!
You have requested:
bcrypt-ruby >= 0
The bundle currently has bcrypt-ruby locked at 3.0.1.
Try running `bundle update bcrypt-ruby`
Again, what the heck? I'm requesting something greater than 0, and it's complaining because the bundle has the gem and it's greater than 0! What's the problem?
The Gemfile contains simply gem 'bcrypt-ruby' - no version specified. Version 3.0.1 should be perfectly acceptable.
I've tried doing bundle update and bundle update bcrypt-ruby on the target server, but neither changes anything.
You are probably not using the correct ruby. Check which ruby is being used after you ssh into the machine. If you're using rvm, I would just uninstall the system ruby.
The problems came down to the fact that my RVM's Ruby wasn't being used by any of the remote commands. They kept using the distro's non-RVM Ruby.
So, two fixes were needed:
Needed to change the RVM path line in my .bashrc:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
need to be changed to prioritize RVM, like this:
PATH=$HOME/.rvm/bin:$PATH # Add RVM to PATH for scripting
I needed to load RVM in my post_setup.sh and post_deploy.sh scripts, so that the succeeding rake commands would use my RVM ruby.
This was accomplished by adding the following to each:
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
exit -1
fi
(The latter was clearly not written by me, given how polished it is. I lifted it from one of my firm's other projects, where they've clearly dealt with this before.)
I also need to run bundle install in my post_setup.sh and post_deploy.sh scripts. This must occur before whiskey_disk starts running Rake, so including it in the Rake script itself is not sufficient.
And now I have whiskey_disk deployments working smoothly.

Jekyll - command not found

I am trying to get Jekyll running but I have no experience with Ruby.
As far as I can tell the installation of Jekyll has succeeded.
However:
$ jekyll
Gives an error:
-bash: jekyll: command not found
This is the gem env result:
- RUBYGEMS VERSION: 1.3.4
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
- INSTALLATION DIRECTORY: /Volumes/HDD/DADU/gems
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /Volumes/HDD/DADU/gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-10
- GEM PATHS:
- /Volumes/HDD/DADU/gems
- /Volumes/HDD/DADU/.gem/ruby/1.8
- /Library/Ruby/Gems/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
And I found the following paths leading to "something" Jekyll:
~.gem/ruby/1.8/gems/jekyll-0.11.0/lib/jekyll.rb
~.gem/ruby/1.8/gems/bin/jekyll (exec file)
If you are using MacOS, from the Troubleshooting guide:
Jekyll & Mac OS X 10.11Permalink
With the introduction of System Integrity Protection, several directories that were previously writable are now considered system locations and are no longer available. Given these changes, there are a couple of simple ways to get up and running. One option is to change the location where the gem will be installed (again, using sudo only if necessary):
$ gem install -n /usr/local/bin jekyll
For others coming here with the following set up:
OS X + brewed install of ruby + (possibly) zsh
I figured the problem is that after installing jekyll as per their instructions, gem installs the jekyll gem in the brew cellar, not where the OS usually expects it (somehwere in a gem directory for ruby).
So, all that was needed here was to find out where the brew install of ruby installs gems, locate the jekyll binary, and create a symbolic link to it in /usr/bin.
Here is are the steps I took to fix it:
Type gem env and look for GEM PATHS. For me it was:
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1.
Make sure you can see the jekyll binary in the directory from 1 above and copy its path (if you can't, search any other paths listed in GEM PATHS for it). For me it was:
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/bin/jekyll
Use the path from step 2 above to create a symlink to /usr/bin/jekyll. I did it by typing this (you might need sudo to create the symlink):
cd /usr/bin && ln -s /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/bin/jekyll jekyll
Now all should be merry if you type jekyll.
The easiest method of doing this is to use RVM. It manages Ruby and all its gems for you and it's easy to use. See this link for using it.
If you did not want to use that you will need to modify your PATH variables so it can find your gems. I have found this to be tedious and reverted to RVM, but here are the general steps.
You will need to find out where your gems are getting installed. If you did gem install ... the gems will be in ~/.gem/ruby/1.8/gems/bin, if you used sudo gem install ... the gems will be somewhere in /System/Library/Frameworks/Ruby.framework/Versions/1.8/Resources
You have to add this path to your PATH variable. Easiest way to do this is by running :
echo 'PATH=$PATH:above/path/to/gems' >> ~/.bash_profile
If you are using RBENV instead of RVM you simply need to run rehash in the command line after installing jekyll:
rbenv rehash
I installed my ruby2.6.0 and gem via brew on MacOS 10.14.
For me, add the following line to my ~/.zshrc solved this issue.
export PATH=/usr/local/lib/ruby/gems/2.6.0/bin:$PATH
I found jekyll executable file with command locate jekyll.
Maybe a little late, but...
I had some trouble to install Jekyll on Ubuntu and tried everything that people answered in this thread - unfortunately nothing worked.
Then, I watched a video on Jekyll's site and after installing the whole ruby package again, sudo gem install jekyll worked.
Try it before anything else:
sudo apt-get update
sudo apt-get install ruby-full
sudo gem install jekyll
jekyll -v
It seems pretty simple, but it works on Ubuntu.
One solution would be editing your ~/.bashrc file and add this line:
PATH=$PATH:~/.gem/ruby/1.8/gems/bin
This will add ~/.gem/ruby/1.8/gems/bin in Bash's lookup path.
Reopen the terminal and it should work. Or you can use the following command:
. ~/.bashrc
Following steps solved my problem
gem uninstall jekyll
sudo gem install jekyll
Open ~/.bash_profile and add this code in the last line,
export PATH=$PATH:/usr/local/lib/ruby/gems/1.9.1/gems/jekyll-2.5.2/bin
Save and close the .bash_profile
Close and reopen the mac terminal, try running jekyll now, it should work
For me, I followed this installation guide instead of their main page's installation instruction. It worked after I changed the bash_profile file and restarted Terminal.
Jekyll is a ruby gem : Ruby gems in linux, for example, are in /var/lib/gems/1.8, as can be seen in the "ruby env" output.
Thus, you need to add the executables in this directory to your path.
In general, if a ruby gem is "not found" by your OS, it simply indicates that either
1) You don't have the gem installed or
2) You don't have the gem installed in a directory that is on your path.
I have found that there have been a few issues with installing ruby and ruby gems on linux (I have found that it can be tricky on Ubuntu v10, and have confirmed this with the Ruby folks on IRC). Thus, tools like RVM or rbenv might be the best approach to setting up a stable, maintainable ruby environment.
Easier than creating a symlink just install it correctly.
If you got permission errors like a lot of people are getting when trying to use
gem install jekyll
instead use
sudo gem install jekyll
#jayunit100,
I'm running into the same issue with a Jekyll blog. I've installed the gem via RVM in a 'Blog directory and the _config.yml file says that it should generate into Blog/_site. Is it as simple as adding Blog to the PATH or is there something else I'm missing?
Update: My bad, I didn't really have the gem installed. Lesson learned: rvm requirements and brew doctor are there for a reason - before you install stuff USE THEM
In my case I had to run bundle install --force
Then bundle exec jekyll serve works, but jekyll serve still doesn't. It seems I'll have to go with the former from now on…
When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/.gem/ruby/1.9.1. The commands provided by the gems you installed will end up in ~/.gem/ruby/1.9.1/bin. For the programs installed there to be available for you, you need to add ~/.gem/ruby/1.9.1/bin to your PATH environment variable.
For example, if you use bash you can add that directory to your PATH by adding code like this to your ~/.bashrc file:
if which ruby >/dev/null && which gem >/dev/null; then
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
https://guides.rubygems.org/faqs/#user-install
I put it in the .bash_profile (Mac OS X).
https://hathaway.cc/2008/06/how-to-edit-your-path-environment-variables-on-mac/
Here's an updated answer for 2020 (soon 2021). To install any Ruby gem, whether it's Jekyll, Bundler, Rails, etc., you need a proper Ruby development environment on a Mac. There are various ways to install Ruby on a Mac, as I have written about in great detail in my definitive guide to installing Ruby gems on a Mac. The only one I recommend is to use a Ruby manager because it's the most flexible and sets you up for success for the long term. My preferred one is chruby because it's the lightest and easiest to use. As part of installing Ruby, you also need to properly configure your shell startup file (typically ~/.zshrc or ~/.bash_profile) so that it knows where to find the gems you install. Otherwise, you'll get the "command not found" error, which I've also written about.
Since there are several steps involved in setting up a working Ruby development environment on a Mac, I wrote some scripts to automate the whole process and make things easier and faster for people. You can read more about the scripts in my guide mentioned above.
I had this problem for a very stupid reason, which is that I was working on Linux and had installed both flatpak and .deb versions of Visual Studio Code. I was confused because I could successfully run bundle exec jekyll serve in the terminal application, but not from the integrated terminal in Visual Studio Code.
Well, it turns out the integrated terminal loaded my PATH correctly in the .deb version but not the flatpak one. So... if you, like me, have foolishly installed multiple versions of Visual Studio Code, check which one you are using.
This is what worked for me. I'm not developing in ruby, and don't have a lot of tools that I use it for, so I don't need RVM. I also don't need to install jekyll as root. I just want it to run.
(This answer is just a more descriptive version of answers by Santa Zhang, jayunit100, and a few others.)
1. Find Local Gem Path
> gem env
Assuming this runs, it will list a bunch of useful information. You are looking for GEM PATHS. If there are two, then you want the one that is found in your home directory. Mine was something like /home/<user>/.local/share/gem/ruby/3.0.0
If it doesn't run, install the ruby gem program and try again.
2. Find Gem Binaries Path
Look in that directory until you find the location where the jekyll executable is actually installed. I found it in /home/<user>/.local/share/gem/ruby/3.0.0/bin/jekyll. But what I need is the directory path, not the file, so: /home/<user>/.local/share/gem/ruby/3.0.0/bin/.
3. Add That to PATH
Figure out how to add a directory to your PATH environment variable. Instructions for that are too extensive to provide here, as it depends on your operating system and preferred shell, and the versions of the same. Search for that information elsewhere on Stackoverflow.
4. Restart Your Session
Close your terminal and open a new one. Make sure the directory was added to your path. Depending on how you set your PATH variable, you might need to log out of your session and log in again.

Resources