If you're using VirtualBox and you're unable to connect to RubyGems to run bundle install, you can try to resolve this by disabling IPv6 within your Virtual Machine.
If you've installed version 1.13 of the LearnLubuntu appliance from the instructions (if you set up VirtualBox after April 16th 2018), you should just be able to run
fix_rubygems from LXTerminal and then
test_rubygems to verify that it's working.
If you set up VirtualBox before version 1.13, you can get this fix by making a couple of changes. First open your bash profile (by running
code ~/.bash_profile in LXTerminal) and add a few aliases:
alias test_rubygems="ruby -ropen-uri -e 'eval open(\"https://git.io/vQhWq\").read'"
alias fix_rubygems="sudo sysctl --system"
alias test_ssh="ssh -T firstname.lastname@example.org"
I like to add these below the git aliases that are already there (pretty near the bottom of the file). Make sure to save your bash profile in visual studio code and then run:
in your terminal to ensure that your new aliases are available in your terminal session.
Next, you'll want to add a few lines to your
/etc/sysctl.conf file. Run
sudo code /etc/sysctl.conf
in your terminal, enter your password, and then add these lines to the bottom of the file.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
/etc/sysctl.conf file in Visual Studio code and return to LXTerminal. Now, you should be able to run
fix_rubygems followed by
test_rubygems and if you're successful you should see something like this: