In today’s development process, I pulled down the code from the master and restarted the project. When I wanted to use the console, I found that I needed a password??And three times after password confirmation or crazy error.
At that time, I first thought that the RVM version was inconsistent, and then I checked the version and gem generation. When I confirmed that the RVM version was correct, and the mandatory use of sudo installation required gem install * * to install the gem package one by one, I was crazy.
The warning is as follows:
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Or as follows:
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
Rbenv wants to install gem into your system’s own ruby, but your user account does not allow the system to install rubygems, so you need to enter a password to give permission
Solution (input from the console in turn)
1 echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' &>&>~/.bashrc
3 source ~/.bashrc
5 ruby -v
Then it’s solved. We can continue to develop hi PI!!