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.
Guess why:
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
2
3 source ~/.bashrc
4
5 ruby -v
Then it’s solved. We can continue to develop hi PI!!
Similar Posts:
- [Solved] Kali beef-xss startup error: cannot load such file — rubyeventmachine (LoadError)
- Failed to build gem native extension encountered while installing sass
- Ruby on Rails : Could not find a JavaScript runtime
- [Solved] Execute the redis command redis-trib.rb to view the cluster information error: cannot load such file — redis (LoadError)
- Setting up CocoaPods master repo [How to Fix Stuck Issue]
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- ubuntu18.04 Start Android StudioKVM is required to run this AVD ./dev/kvm device: permission denied.
- Add Samba user prompt failed to add entry for user
- [Solved] Forbid root, handle error sudo must be owned by uid 0
- Quick resolution of gem install redis error