Tag Archives: rvm

Solution – bash: RVM: command not found prompt, install RVM offline in MAC environment

This article gives you a comprehensive understanding of Java object serialization and deserialization>>>

Download RVM in GitHub

The download address is

git clone https://github.com/rvm/rvm.git

As shown in the figure above, after downloading, double-click to open /bin/RVM instaler

As shown in the figure above, it is proved that RVM is installed, but the environment variables need to be configured to make the RVM command take effect. Execute the following command:

kinglyimac@192 ~ % vi ~/.bash_profile
kinglyimac@192 ~ % source ~/.rvm/scripts/rvm

Use RVM - V to view the version. The following indicates that the installation is complete

kinglyimac@192 ~ % rvm -v
rvm 1.29.10-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
kinglyimac@192 ~ % 

Your user account isn’t allowed to install to the system rubygems solution

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!!