I've installed Ruby 2.6.6 on Ubuntu 18.04 using the following commands:
wget http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz
tar -xzvf ruby-2.6.6.tar.gz
cd ruby-2.6.6/
./configure
sudo make install
ruby -v
confirms 2.6.6 installed.
But then when I run gem install bundler
I get the error /usr/bin/gem: no such file or directory
Before installing Ruby 2.6.6 I removed version 2.5 using sudo apt-get purge ruby
, so I'm wondering if the paths need re-configuring. I'm new to Ruby so I'm a bit lost. Any guidance please?
which ruby
returns /usr/local/bin/ruby
I've found the gem directory in /usr/local/bin/gem
how do I re-configure the gem path reference from /usr/bin/gem
to /usr/local/bin/gem
?