sudo yum -y install gcc
sudo yum -y install make
sudo yum -y install openssl
sudo yum -y install openssl-devel
sudo yum -y install gcc-c++
sudo yum install -y mysql-devel
sudo yum install -y readline-devel
sudo yum install -y libxml2-devel
sudo yum install -y libxslt-devel
sudo yum install -y bzip2
$ sudo yum -y install git
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ exec $SHELL -l
Cependant, l'installation de rbenv ne peut pas être effectuée à ce rythme.
$ rbenv install -v 2.6.2
rbenv: no such command `install'
Si vous regardez l'aide, vous pouvez voir qu'il n'y a pas de commande d'installation.
$ rbenv -h
Usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all available rbenv commands
local Set or show the local application-specific Ruby version
global Set or show the global Ruby version
shell Set or show the shell-specific Ruby version
rehash Rehash rbenv shims (run this after installing executables)
version Show the current Ruby version and its origin
versions List installed Ruby versions
which Display the full path to an executable
whence List all Ruby versions that contain the given executable
Pour l'installer, vous avez besoin du plug-in ruby-build
, donc installez-le.
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Si vous regardez l'aide, vous pouvez voir que l'installation (et la désinstallation) a été ajoutée.
$ rbenv -h
Usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all available rbenv commands
local Set or show the local application-specific Ruby version
global Set or show the global Ruby version
shell Set or show the shell-specific Ruby version
install Install a Ruby version using ruby-build
uninstall Uninstall a specific Ruby version
rehash Rehash rbenv shims (run this after installing executables)
version Show the current Ruby version and its origin
versions List installed Ruby versions
which Display the full path to an executable
whence List all Ruby versions that contain the given executable
See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/rbenv/rbenv#readme
rbenv install -v 2.6.2
lancera l'installation.
Une fois l'installation terminée, vous pouvez la vérifier avec les versions de rbenv
.
$ rbenv versions
* system
2.6.2
Le fichier journal au moment de l'installation porte le nom de fichier ruby-build.xxxxxxxxxxxxxxx.log
Il est stocké sous / tmp /.
Recommended Posts